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

Subsystems: the rest

STALE3732d

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

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

From: Alexander Gavrilov <hidden>
Date: 2016-06-15 22:47:29

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.

Signed-off-by: Alexander Gavrilov <redacted>
---
 git-svn.perl |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index e0ec258..e9030ff 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -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: ",
-- 
1.6.3.2.13.g94af7

Re: [PATCH] git-svn: Avoid spurious errors when rewriteRoot is used.

From: Eric Wong <hidden>
Date: 2016-06-15 22:47:29

Alexander Gavrilov [off-list ref] wrote:
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.

Signed-off-by: Alexander Gavrilov <redacted>
Thanks Alexander,

Acked-by: Eric Wong <redacted>

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

-- 
Eric Wong

Re: [PATCH] git-svn: Avoid spurious errors when rewriteRoot is used.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:30

Eric Wong [off-list ref] writes:
Thanks Alexander,

Acked-by: Eric Wong <redacted>

Fixed some line wrapping and pushed out to
  git://git.bogomips.org/git-svn
Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help