Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Remove trailing slashes
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
raw
|
patch
|
inline
| side by side (parent:
ceae78b
)
diff --git
a/git-svnimport.perl
b/git-svnimport.perl
index cb9afb955ccac5dec1494ab5a63c0cb0f868374a..af13fdd8e40c0c2e13e6b0391badcf921e34bb9b 100755
(executable)
--- a/
git-svnimport.perl
+++ b/
git-svnimport.perl
@@
-280,7
+280,8
@@
($$)
$svnpath = "$branch_name/$branch/$path";
}
$svnpath = "$branch_name/$branch/$path";
}
- return $svnpath
+ $svnpath =~ s#/+$##;
+ return $svnpath;
}
sub get_file($$$) {
}
sub get_file($$$) {
@@
-372,6
+373,10
@@
($$$$$$$$)
my($newrev,$newbranch,$path,$oldpath,$rev,$node_kind,$new,$parents) = @_;
my($srcbranch,$srcpath) = split_path($rev,$oldpath);
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) {
my $therev = branch_rev($srcbranch, $rev);
my $gitrev = $branches{$srcbranch}{$therev};
unless($gitrev) {