diff options
author | Matthias Urlichs <smurf@smurf.noris.de> | 2005-11-14 08:31:00 +0100 |
---|---|---|
committer | Matthias Urlichs <smurf@smurf.noris.de> | 2005-11-14 08:31:00 +0100 |
commit | 4b1ca25e429a67de4828c029b053dea637732722 (patch) | |
tree | 6947e994b9ed7a33c755494b5b96c70a201bc8a8 /git-svnimport.perl | |
parent | ceae78b438d2e5ca035aec9b067643ca79ed4ccd (diff) | |
download | git-4b1ca25e429a67de4828c029b053dea637732722.tar.gz git-4b1ca25e429a67de4828c029b053dea637732722.tar.xz |
Remove trailing slashes
SVN dies a messy death when passed a path with trailing slashes.
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 cb9afb955..af13fdd8e 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) { |