From: Alexander Gavrilov Date: Fri, 9 Oct 2009 07:01:04 +0000 (+0400) Subject: git-svn: Avoid spurious errors when rewriteRoot is used. X-Git-Tag: v1.6.5~20^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c03c1f798d5f865331428e88c7d19b15471d25a8;p=git.git 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. [ew: fixed line wrapping] Signed-off-by: Alexander Gavrilov Acked-by: Eric Wong --- diff --git a/git-svn.perl b/git-svn.perl index e0ec258e3..ab65d688f 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -603,8 +603,15 @@ 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: ",