Skip to contentSkip to conversation

git-svn: Avoid spurious errors when rewriteRoot is used.

PATCH In review Alexander Gavrilov 3 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 git-svn: Avoid spurious errors when rewriteRoot is used.

After doing a rebase, git-svn checks that the SVN URL is what it expects. However, it does not account for rewriteRoot, which is a legitimate way for the URL to change. This produces a lot of spurious errors.

---
 git-svn.perl |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
git-svn.perl +6 -2
index e0ec258..e9030ff 100755
@@ -603,8 +603,12 @@ sub cmd_dcommit {
 					  "\nBefore dcommitting";
 				}
 				if ($url_ ne $expect_url) {
-					fatal "URL mismatch after rebase: ",
-					      "$url_ != $expect_url";
+					if ($url_ eq $gs->metadata_url) {
+						print "Accepting rewritten URL: $url_\n";
+					} else {
+						fatal "URL mismatch after rebase: ",
+						      "$url_ != $expect_url";
+					}
 				}
 				if ($uuid_ ne $uuid) {
 					fatal "uuid mismatch after rebase: ",
Signature · 1 line
1.6.3.2.13.g94af7
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Alexander Gavrilov

After doing a rebase, git-svn checks that the SVN URL is what it expects. However, it does not account for rewriteRoot, which is a legitimate way for the URL to change. This produces a lot of spurious errors.

Thanks Alexander,

Fixed some line wrapping and pushed out to
git://git.bogomips.org/git-svn

Signature · 1 line
Eric Wong