Created
August 20, 2008 20:17
-
-
Save dstrelau/6442 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/git-svn.perl b/git-svn.perl | |
index 099fd02..7a1d26d 100755 | |
--- a/git-svn.perl | |
+++ b/git-svn.perl | |
@@ -421,7 +421,7 @@ sub cmd_dcommit { | |
$head ||= 'HEAD'; | |
my @refs; | |
my ($url, $rev, $uuid, $gs) = working_head_info($head, \@refs); | |
- $url = $_commit_url if defined $_commit_url; | |
+ $url = defined $_commit_url ? $_commit_url : $gs->full_url; | |
my $last_rev = $_revision if defined $_revision; | |
if ($url) { | |
print "Committing to $url ...\n"; | |
@@ -437,6 +437,8 @@ sub cmd_dcommit { | |
"If these changes depend on each other, re-running ", | |
"without --no-rebase may be required." | |
} | |
+ my $expect_url = $url; | |
+ Git::SVN::remove_username($expect_url); | |
while (1) { | |
my $d = shift @$linear_refs or last; | |
unless (defined $last_rev) { | |
@@ -511,9 +513,9 @@ sub cmd_dcommit { | |
$gs->refname, | |
"\nBefore dcommitting"; | |
} | |
- if ($url_ ne $url) { | |
+ if ($url_ ne $expect_url) { | |
fatal "URL mismatch after rebase: ", | |
- "$url_ != $url"; | |
+ "$url_ != $expect_url"; | |
} | |
if ($uuid_ ne $uuid) { | |
fatal "uuid mismatch after rebase: ", | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment