From: Shawn Boyette Date: Mon, 8 Dec 2008 23:07:58 +0000 (+0000) Subject: compress: add leads and subs to used hash X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=commitdiff_plain;h=e6cbd19e5a9d0b495ecc90b66a22d69e93190c02 compress: add leads and subs to used hash --- diff --git a/compress_fingerprints b/compress_fingerprints index 6bc9361..b5f4470 100755 --- a/compress_fingerprints +++ b/compress_fingerprints @@ -87,9 +87,7 @@ sub rank_fingerprint { =head2 dump_records -Writes out a 2-column file of lead and subordinate records. If -posttest is enabled, a scan is also done to ensure that no recordid -appears as both a subordinate and lead. +Writes out a 2-column file of lead and subordinate records. =cut @@ -98,6 +96,8 @@ sub dump_records { open OUT, '>', $conf->{output} or die "Can't open ", $conf->{output}, "$!\n"; for my $id (keys %recs) { + next if defined $used{$id}; + $used{$id} = 1; next unless $recs{$id}{lead}; for my $sha1 ( keys %{$recs{$id}} ) { for my $subid ( @{$fps{$sha1}{recs}} ) {