[PATCH stable] graphmod: don't try to visit nullrev (issue3772)

Sean Farley sean.michael.farley at gmail.com
Tue Jan 22 12:45:51 CST 2013


On Tue, Jan 22, 2013 at 12:26 PM, Augie Fackler <lists at durin42.com> wrote:
> LGTM, ship it.
>
> On Tue, Jan 22, 2013 at 1:15 PM, Bryan O'Sullivan <bos at serpentine.com> wrote:
>> # HG changeset patch
>> # User Bryan O'Sullivan <bryano at fb.com>
>> # Date 1358878516 28800
>> # Node ID 7ea2e6d23afc8a22d7f71822ea9efed94d18b2d4
>> # Parent  8c019d2fd7c03f073f7b879ccb87f3e2891bce8a
>> graphmod: don't try to visit nullrev (issue3772)
>>
>> diff --git a/mercurial/graphmod.py b/mercurial/graphmod.py
>> --- a/mercurial/graphmod.py
>> +++ b/mercurial/graphmod.py
>> @@ -181,7 +181,7 @@ def asciiedges(type, char, lines, seen,
>>      ncols = len(seen)
>>      nextseen = seen[:]
>>      nextseen[nodeidx:nodeidx + 1] = newparents
>> -    edges = [(nodeidx, nextseen.index(p)) for p in knownparents]
>> +    edges = [(nodeidx, nextseen.index(p)) for p in knownparents if p != nullrev]

On IRC, Kevin and Pierre-Yves were thinking that this is a bug in
'revrange' and that ":null" should return [-1] instead of [0,-1].
Thoughts?


More information about the Mercurial-devel mailing list