git-svn: Fix for rewriteRoot URL containing username.

If the new svn root URL given with the svn-remote.<repo>.rewriteRoot config option
(or by the --rewrite-root option to 'git svn init') contains a username
(such as 'svn+ssh://username@example.com/repo'), find_by_url() cannot find
the repository URL, because the URL contained in the commit message does have
the username removed.

Signed-off-by: Dévai Tamás <devait@mailbox.sk>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Dévai Tamás 2009-02-12 00:14:02 +01:00 committed by Junio C Hamano
parent 88a667f063
commit 1b7e543a6e

View File

@ -1693,6 +1693,7 @@ sub find_by_url { # repos_root and, path are optional
my $prefix = ''; my $prefix = '';
if ($rwr) { if ($rwr) {
$z = $rwr; $z = $rwr;
remove_username($z);
} elsif (defined $svm) { } elsif (defined $svm) {
$z = $svm->{source}; $z = $svm->{source};
$prefix = $svm->{replace}; $prefix = $svm->{replace};