summaryrefslogtreecommitdiff
path: root/git-svnimport.perl
diff options
context:
space:
mode:
authorMatthias Urlichs <smurf@smurf.noris.de>2005-10-10 15:28:00 +0200
committerMatthias Urlichs <smurf@smurf.noris.de>2005-10-10 15:28:00 +0200
commite7e477dfacecaf362f08a65644d806da5231a9f0 (patch)
tree08d1bc6b1f3577d4b8c4e311287486a2c62474b7 /git-svnimport.perl
parent7ee74a99b2b710b5f5adc22db2fe0aca8a74c809 (diff)
downloadgit-e7e477dfacecaf362f08a65644d806da5231a9f0.tar.gz
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>
Diffstat (limited to 'git-svnimport.perl')
-rwxr-xr-xgit-svnimport.perl12
1 files changed, 6 insertions, 6 deletions
diff --git a/git-svnimport.perl b/git-svnimport.perl
index 896222ba74..00f563daec 100755
--- a/git-svnimport.perl
+++ b/git-svnimport.perl
@@ -244,7 +244,7 @@ EOM
my($num,$branch,$ref) = split;
$branches{$branch}{$num} = $ref;
$branches{$branch}{"LAST"} = $ref;
- $current_rev = $num+1 if $current_rev < $num+1;
+ $current_rev = $num if $current_rev < $num;
}
close($B);
}
@@ -557,11 +557,6 @@ sub commit {
close(C)
or die "Cannot write branch $dest for update: $!\n";
}
- $branches{$branch}{"LAST"} = $cid;
- $branches{$branch}{$revision} = $cid;
- $last_rev = $cid;
- print BRANCHES "$revision $branch $cid\n";
- print "DONE: $revision $dest $cid\n" if $opt_v;
if($tag) {
my($in, $out) = ('','');
@@ -593,6 +588,11 @@ sub commit {
print "Created tag '$dest' on '$branch'\n" if $opt_v;
}
+ $branches{$branch}{"LAST"} = $cid;
+ $branches{$branch}{$revision} = $cid;
+ $last_rev = $cid;
+ print BRANCHES "$revision $branch $cid\n";
+ print "DONE: $revision $dest $cid\n" if $opt_v;
}
my ($changed_paths, $revision, $author, $date, $message, $pool) = @_;