svn import: incremental imports
Incremental imports skipped a revision. Also improve interrupt safety -- ^C while writing a tag caused the tag to be skipped. Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Matthias Urlichs committed
Oct 10, 2005 at 15:28 UTC
e7e477dfacecaf362f08a65644d806da5231a9f0
1 file changed
+6
-6
git-svnimport.perl
+6
-6
@@ -244,7 +244,7 @@ EOM
244
my($num,$branch,$ref) = split;
245
$branches{$branch}{$num} = $ref;
246
$branches{$branch}{"LAST"} = $ref;
247
- $current_rev = $num+1 if $current_rev < $num+1;
247
+ $current_rev = $num if $current_rev < $num;
248
}
249
close($B);
250
}
@@ -557,11 +557,6 @@ sub commit {
557
close(C)
558
or die "Cannot write branch $dest for update: $!\n";
559
}
560
- $branches{$branch}{"LAST"} = $cid;
561
- $branches{$branch}{$revision} = $cid;
562
- $last_rev = $cid;
563
- print BRANCHES "$revision $branch $cid\n";
564
- print "DONE: $revision $dest $cid\n" if $opt_v;
560
561
if($tag) {
562
my($in, $out) = ('','');
@@ -593,6 +588,11 @@ sub commit {
588
589
print "Created tag '$dest' on '$branch'\n" if $opt_v;
590
}
591
+ $branches{$branch}{"LAST"} = $cid;
592
+ $branches{$branch}{$revision} = $cid;
593
+ $last_rev = $cid;
594
+ print BRANCHES "$revision $branch $cid\n";
595
+ print "DONE: $revision $dest $cid\n" if $opt_v;
596
}
597
598
my ($changed_paths, $revision, $author, $date, $message, $pool) = @_;