Commits

Anonymous committed 4b1ca25

Remove trailing slashes

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

Comments (0)

Files changed (1)

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) {