[PATCH stable] graphmod: don't try to visit nullrev (issue3772)
Kevin Bullock
kbullock+mercurial at ringworld.org
Tue Jan 22 13:26:11 CST 2013
On Jan 22, 2013, at 1:15 PM, Matt Mackall wrote:
> On Tue, 2013-01-22 at 13:47 -0500, Augie Fackler wrote:
>> On Tue, Jan 22, 2013 at 1:45 PM, Sean Farley
>> <sean.michael.farley at gmail.com> wrote:
>>> 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?
>>
>>
>> Interesting. I'm somewhat inclined to agree, as nothing is an ancestor of null.
>
> Actually, this does the right thing:
>
> hg log -r ::null
>
> Note the double colon.
Assuming that "the right thing" means not showing a revision that I explicitly mentioned on the command line... but in this special case, that makes sense to me.
> We've intrinsically defined :rev as 0:rev. And we also have a notion of
> allowing x:y where x > y. Which means some of the results are 'correct'.
> Perhaps we need to instead define it as '-1:rev and not -1'.
...which would give the same result as above. It strikes me that we may also experience strange behavior with 'null:' and '(null:)'.
...and in fact we do. The behavior is the same as below (the old-style result includes -1, the revset result doesn't):
> On the other hand, x:x should behave like x:
>
> $ hg log -r 'null:null'
> changeset: -1:000000000000
> user:
> date: Thu Jan 01 00:00:00 1970 +0000
>
> $ hg log -r '(null:null)'
>
> --
> Mathematics is the supreme nostalgia of our time.
>
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
pacem in terris / мир / शान्ति / سَلاَم / 平和
Kevin R. Bullock
More information about the Mercurial-devel
mailing list