git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Vilain <sam@vilain.net>
To: Michael Olson <mwolson@gnu.org>
Cc: git@vger.kernel.org, Eric Wong <normalperson@yhbt.net>,
	Michael J Gruber <git@drmicha.warpmail.net>,
	Tim Stoakes <tim@stoakes.net>
Subject: Re: [PATCH/RFC 2/2] git-svn: Don't allow missing commit parent to stop  git-svn
Date: Thu, 22 Apr 2010 08:07:50 +1200	[thread overview]
Message-ID: <1271880470.20208.47.camel@denix> (raw)
In-Reply-To: <j2wc8b3bef91004201430ie371be83kee0e3e4c35ab9c9e@mail.gmail.com>

On Tue, 2010-04-20 at 14:30 -0700, Michael Olson wrote:
> Instead, fall back to assuming that the incoming merge is a bunch of
> cherry-picks and ignore it.
> 
> Signed-off-by: Michael W. Olson <mwolson@gnu.org>
> ---
>  git-svn.perl |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/git-svn.perl b/git-svn.perl
> index 0e1feb3..1a53709 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -3110,7 +3110,7 @@ sub check_cherry_pick {
>  	my %commits = map { $_ => 1 }
>  		_rev_list("--no-merges", $tip, "--not", $base);
>  	for my $range ( @ranges ) {
> -		delete @commits{_rev_list($range)};
> +		eval { delete @commits{_rev_list($range)} };
>  	}
>  	for my $commit (keys %commits) {
>  		if (has_no_changes($commit)) {

If the _rev_list here fails, it means it was passed in a bad range.
This means that the calling code somehow ends up with a commit ID
which doesn't exist.  It's normally better to detect errors when
they happen, not deeper into other functions when they break things...

Sam

  reply	other threads:[~2010-04-21 20:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-20 21:30 [PATCH/RFC 2/2] git-svn: Don't allow missing commit parent to stop git-svn Michael Olson
2010-04-21 20:07 ` Sam Vilain [this message]
2010-04-21 21:17   ` Michael Olson
2010-04-21 23:45     ` [spf:guess,iffy,mismatch] " Sam Vilain
2010-04-28 15:51       ` Michael Olson
2010-05-03 21:19         ` Eric Wong
2010-05-04  6:40           ` Michael J Gruber
2010-05-04 18:34             ` Eric Wong
2010-05-04 22:02               ` Sam Vilain
2010-05-04 23:16                 ` Eric Wong
2010-05-19 21:17                   ` Michael Olson
2010-05-19 21:19                     ` Michael Olson

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=1271880470.20208.47.camel@denix \
    --to=sam@vilain.net \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=mwolson@gnu.org \
    --cc=normalperson@yhbt.net \
    --cc=tim@stoakes.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).