Skip to content

Commit

Permalink
Remove trailing slashes
Browse files Browse the repository at this point in the history
SVN dies a messy death when passed a path with trailing slashes.
  • Loading branch information
Matthias Urlichs committed Nov 14, 2005
1 parent ceae78b commit 4b1ca25
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion git-svnimport.perl
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ ($$)
$svnpath = "$branch_name/$branch/$path";
}

return $svnpath
$svnpath =~ s#/+$##;
return $svnpath;
}

sub get_file($$$) {
Expand Down Expand Up @@ -372,6 +373,10 @@ ($$$$$$$$)
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) {
Expand Down

0 comments on commit 4b1ca25

Please sign in to comment.