From: Thomas Rast <trast@student.ethz.ch>
To: git@vger.kernel.org
Cc: Eric Wong <normalperson@yhbt.net>, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] git svn: catch lack of upstream info for dcommit earlier
Date: Sun, 31 Aug 2008 15:50:59 +0200 [thread overview]
Message-ID: <1220190659-5955-1-git-send-email-trast@student.ethz.ch> (raw)
In-Reply-To: <c7d83d0d0808310029s15c1413m49cad5c68a568271@mail.gmail.com>
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>
---
Weyert de Boer wrote:
> Can't call method "full_url" on an undefined value at
> /opt/local/libexec/git-core/git-svn line 425.
After resolving the problem on IRC, here's the fix to avoid the
unhelpful message.
git-svn.perl | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 7a1d26d..43bf201 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -421,15 +421,15 @@ sub cmd_dcommit {
$head ||= 'HEAD';
my @refs;
my ($url, $rev, $uuid, $gs) = working_head_info($head, \@refs);
+ unless ($gs) {
+ die "Unable to determine upstream SVN information from ",
+ "$head history.\nPerhaps the repository is empty.";
+ }
$url = defined $_commit_url ? $_commit_url : $gs->full_url;
my $last_rev = $_revision if defined $_revision;
if ($url) {
print "Committing to $url ...\n";
}
- unless ($gs) {
- die "Unable to determine upstream SVN information from ",
- "$head history.\nPerhaps the repository is empty.";
- }
my ($linear_refs, $parents) = linearize_history($gs, \@refs);
if ($_no_rebase && scalar(@$linear_refs) > 1) {
warn "Attempting to commit more than one change while ",
--
1.6.0.1.278.g5a622
next prev parent reply other threads:[~2008-08-31 13:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-31 7:29 Problems with using git svn dcommit Weyert de Boer
2008-08-31 13:50 ` Thomas Rast [this message]
2008-09-01 3:26 ` [PATCH] git svn: catch lack of upstream info for dcommit earlier Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1220190659-5955-1-git-send-email-trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=normalperson@yhbt.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).