summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4dc1db0)
raw | patch | inline | side by side (parent: 4dc1db0)
author | Eric Wong <normalperson@yhbt.net> | |
Wed, 20 Aug 2008 07:30:06 +0000 (00:30 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 21 Aug 2008 06:48:07 +0000 (23:48 -0700) |
Don't rely on the extracted URL from working_head_info since that has the
username removed. Instead use the $gs->full_url method (as before with
ba24e74 (git-svn: add ability to specify --commit-url for dcommit,
2008-08-07)) to give us the URL to commit to if --commit-url is not
specified.
Aditionally, since we clean usernames from URLs, checking the URL after
rebase can fail because it doesn't match the URL we used to commit; so
unconditionally provide a username-free URL for checking the result of the
refetch.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
username removed. Instead use the $gs->full_url method (as before with
ba24e74 (git-svn: add ability to specify --commit-url for dcommit,
2008-08-07)) to give us the URL to commit to if --commit-url is not
specified.
Aditionally, since we clean usernames from URLs, checking the URL after
rebase can fail because it doesn't match the URL we used to commit; so
unconditionally provide a username-free URL for checking the result of the
refetch.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-svn.perl | patch | blob | history |
diff --git a/git-svn.perl b/git-svn.perl
index 099fd02b3fcf10b230e8397e695b3b8af8301d5a..7a1d26db8bcc451545fad2f8d55d43a5079d2302 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
$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";
"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) {
$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: ",