summaryrefslogtreecommitdiff
path: root/git-svnimport.perl
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-11-14 18:39:18 -0800
committerJunio C Hamano <junkio@cox.net>2005-11-14 18:39:18 -0800
commit60d64db4614b1007ca37c228923ec1964d5ad394 (patch)
treed376d7e422b9a6cc51ef9a4b7f90e59f5520247e /git-svnimport.perl
parentf7a2eb735982e921ae4379f1dcf5f7a023610393 (diff)
parentd7bba815753bf8c31886fcf6bb89c9e6250674a5 (diff)
downloadgit-60d64db4614b1007ca37c228923ec1964d5ad394.tar.gz
GIT 0.99.9i aka 1.0rc2v1.0rc2v0.99.9i
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-svnimport.perl')
-rwxr-xr-xgit-svnimport.perl7
1 files changed, 6 insertions, 1 deletions
diff --git a/git-svnimport.perl b/git-svnimport.perl
index cb9afb955c..af13fdd8e4 100755
--- a/git-svnimport.perl
+++ b/git-svnimport.perl
@@ -280,7 +280,8 @@ sub revert_split_path($$) {
$svnpath = "$branch_name/$branch/$path";
}
- return $svnpath
+ $svnpath =~ s#/+$##;
+ return $svnpath;
}
sub get_file($$$) {
@@ -372,6 +373,10 @@ sub copy_path($$$$$$$$) {
my($newrev,$newbranch,$path,$oldpath,$rev,$node_kind,$new,$parents) = @_;
my($srcbranch,$srcpath) = split_path($rev,$oldpath);
+ unless(defined $srcbranch) {
+ print "Path not found when copying from $oldpath @ $rev\n";
+ return;
+ }
my $therev = branch_rev($srcbranch, $rev);
my $gitrev = $branches{$srcbranch}{$therev};
unless($gitrev) {