@matheusbsbs / matheus-bagliano / commits / 2cb611054a
Fork 0

git svn: catch lack of upstream info for dcommit earlier

Since 711521e 'git svn dcommit' attempts to use the upstream information to determine the SVN URL, before it verifies that it even found an upstream. Move up the corresponding check. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>

Thomas Rast committed Aug 31, 2008 at 15:50 UTC 2cb611054a9597a00e9387c77e75d82e78982e60
1 file changed +4 -4
git-svn.perl
+4 -4
@@ -421,15 +421,15 @@ sub cmd_dcommit {
421 $head ||= 'HEAD';
422 my @refs;
423 my ($url, $rev, $uuid, $gs) = working_head_info($head, \@refs);
424 + unless ($gs) {
425 + die "Unable to determine upstream SVN information from ",
426 + "$head history.\nPerhaps the repository is empty.";
427 + }
428 $url = defined $_commit_url ? $_commit_url : $gs->full_url;
429 my $last_rev = $_revision if defined $_revision;
430 if ($url) {
431 print "Committing to $url ...\n";
432 }
429 - unless ($gs) {
430 - die "Unable to determine upstream SVN information from ",
431 - "$head history.\nPerhaps the repository is empty.";
432 - }
433 my ($linear_refs, $parents) = linearize_history($gs, \@refs);
434 if ($_no_rebase && scalar(@$linear_refs) > 1) {
435 warn "Attempting to commit more than one change while ",