threads / patch / 21166

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

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

## tl;dr

3 messages between Oct 9, 2009 and Oct 9, 2009. Diffs are folded; open one to read it.

replies: 2people: 3as markdown or json

Alexander Gavrilov· Oct 9, 2009, 07:01 UTC · lore

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 <angavrilov@gmail.com>
---
 git-svn.perl |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
Show changes to git-svn.perl +6 −2
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
Eric Wong· Oct 9, 2009, 08:34 UTC · re: Alexander Gavrilov · lore

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

Alexander Gavrilov <angavrilov@gmail.com> wrote:
Show 6 quoted lines
> 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 <angavrilov@gmail.com>
Thanks Alexander,
Acked-by: Eric Wong <normalperson@yhbt.net>
Fixed some line wrapping and pushed out to
  git://git.bogomips.org/git-svn
-- 
Eric Wong
Junio C Hamano· Oct 9, 2009, 20:44 UTC · re: Eric Wong · lore

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

Eric Wong <normalperson@yhbt.net> writes:
Show 6 quoted lines
> Thanks Alexander,
>
> Acked-by: Eric Wong <normalperson@yhbt.net>
>
> Fixed some line wrapping and pushed out to
>   git://git.bogomips.org/git-svn
Thanks.

← back to recent threads