summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ceae78b)
raw | patch | inline | side by side (parent: ceae78b)
author | Matthias Urlichs <smurf@smurf.noris.de> | |
Mon, 14 Nov 2005 07:31:00 +0000 (08:31 +0100) | ||
committer | Matthias Urlichs <smurf@smurf.noris.de> | |
Mon, 14 Nov 2005 07:31:00 +0000 (08:31 +0100) |
SVN dies a messy death when passed a path with trailing slashes.
git-svnimport.perl | patch | blob | history |
diff --git a/git-svnimport.perl b/git-svnimport.perl
index cb9afb955ccac5dec1494ab5a63c0cb0f868374a..af13fdd8e40c0c2e13e6b0391badcf921e34bb9b 100755 (executable)
--- a/git-svnimport.perl
+++ b/git-svnimport.perl
$svnpath = "$branch_name/$branch/$path";
}
- return $svnpath
+ $svnpath =~ s#/+$##;
+ return $svnpath;
}
sub get_file($$$) {
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) {