Skip to contentSkip to conversation

git-svn: Fix for rewriteRoot URL containing username.

PATCH In review Dévai Tamás 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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://[email protected]/repo'), find_by_url() cannot find the repository URL, because the URL contained in the commit message does have the username removed.

---
 git-svn.perl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
git-svn.perl +1 -0
index 001a1d8..83cb36f 100755
@@ -1693,6 +1693,7 @@ sub find_by_url { # repos_root and, path are optional
 			my $prefix = '';
 			if ($rwr) {
 				$z = $rwr;
+				remove_username($z);
 			} elsif (defined $svm) {
 				$z = $svm->{source};
 				$prefix = $svm->{replace};
Signature · 1 line
1.6.1.2
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Dévai Tamás

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://[email protected]/repo'), find_by_url() cannot find the repository URL, because the URL contained in the commit message does have the username removed.

Thanks Dévai,

Quoted 18 lines
---
 git-svn.perl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
git-svn.perl +1 -0
index 001a1d8..83cb36f 100755
@@ -1693,6 +1693,7 @@ sub find_by_url { # repos_root and, path are optional
 			my $prefix = '';
 			if ($rwr) {
 				$z = $rwr;
+				remove_username($z);
 			} elsif (defined $svm) {
 				$z = $svm->{source};
 				$prefix = $svm->{replace};
Signature · 1 line
1.6.1.2