@matheusbsbs / matheus-bagliano / commits / 4b1ca25e42
Fork 0

Remove trailing slashes

SVN dies a messy death when passed a path with trailing slashes.

Matthias Urlichs committed Nov 14, 2005 at 08:31 UTC 4b1ca25e429a67de4828c029b053dea637732722
1 file changed +6 -1
git-svnimport.perl
+6 -1
@@ -280,7 +280,8 @@ sub revert_split_path($$) {
280 $svnpath = "$branch_name/$branch/$path";
281 }
282
283 - return $svnpath
283 + $svnpath =~ s#/+$##;
284 + return $svnpath;
285 }
286
287 sub get_file($$$) {
@@ -372,6 +373,10 @@ sub copy_path($$$$$$$$) {
373 my($newrev,$newbranch,$path,$oldpath,$rev,$node_kind,$new,$parents) = @_;
374
375 my($srcbranch,$srcpath) = split_path($rev,$oldpath);
376 + unless(defined $srcbranch) {
377 + print "Path not found when copying from $oldpath @ $rev\n";
378 + return;
379 + }
380 my $therev = branch_rev($srcbranch, $rev);
381 my $gitrev = $branches{$srcbranch}{$therev};
382 unless($gitrev) {