Code

git-svn: Avoid spurious errors when rewriteRoot is used.
authorAlexander Gavrilov <angavrilov@gmail.com>
Fri, 9 Oct 2009 07:01:04 +0000 (11:01 +0400)
committerEric Wong <normalperson@yhbt.net>
Fri, 9 Oct 2009 08:31:05 +0000 (01:31 -0700)
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 <angavrilov@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
git-svn.perl

index e0ec258e335ceb88e97f749e22f997a4f699eb8b..ab65d688fe3f180adaff0264be06ae1e010f8229 100755 (executable)
@@ -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: ",