diff options
| author | Junio C Hamano <junkio@cox.net> | 2005-11-14 18:39:18 -0800 |
|---|---|---|
| committer | Junio C Hamano <junkio@cox.net> | 2005-11-14 18:39:18 -0800 |
| commit | 60d64db4614b1007ca37c228923ec1964d5ad394 (patch) | |
| tree | d376d7e422b9a6cc51ef9a4b7f90e59f5520247e /git-svnimport.perl | |
| parent | GIT 0.99.9h (diff) | |
| parent | Update topo-order test. (diff) | |
| download | git-0.99.9i.tar.gz git-0.99.9i.zip | |
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-svnimport.perl')
| -rwxr-xr-x | git-svnimport.perl | 7 |
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) { |
