Re: [PATCH/RFC 2/2] git-svn: Don't allow missing commit parent to stop git-svn

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 21, 2010 at 1:07 PM, Sam Vilain <sam@xxxxxxxxxx> wrote:
> 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@xxxxxxx>
>> ---
>>  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...

Interestingly, I see people reporting the same problem in the thread
"git svn clone of subversion's own code failing".  So it's not just
related to patch 1/2 of this series.  At least that thread has a
public-facing repo so the problem should be easier to reproduce for a
real fix.

-- 
Michael Olson  |  http://mwolson.org/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]