[PATCH] revset: allow negative integers to list child revs

Augie Fackler raf at durin42.com
Wed Oct 8 08:36:08 CDT 2014


On Tue, Oct 7, 2014 at 8:44 PM, Sean Farley
<sean.michael.farley at gmail.com> wrote:
>
> Augie Fackler writes:
>
>> On Oct 7, 2014, at 4:12 PM, Sean Farley <sean.michael.farley at gmail.com> wrote:
>>
>>>>> Yes, of course, but this is derailing the current discussion. We have
>>>>> the concept of local revision numbers and this patch is a way to refer
>>>>> to that. I would suggest another discussion about the order of
>>>>> children().
>>>>
>>>> This is not to challenge the order of children(X). This is to point out
>>>> that children can barely be used alone and therefor having a supershort
>>>> version of it is not that useful.
>>>
>>> I'm surprised you are being this stubborn about it. It is very, very
>>> common to have a set of linear changes. It is even still common to be in
>>> a situation where you only have a reference to the parent of a
>>> changeset.
>>
>> I could see a claim that an "only child of" operator would be more useful than an "arbitrary child" operator (that is, abort if len(children) != 1). Maybe that'd be the useful middle ground here?
>
> I really don't see the problem with an arbitrary child operator. For
> most cases, the use would be with one child. If someone wants to use it
> for the second child, then that is also deterministic: ordered by local
> revnum.


I don't disagree, but I can see Pierre-Yves's position: we are adding
a little bit to the rope of surprising behavior by allowing nth-child
selection, and maybe it's worth avoiding. Was just trying to offer a
suggestion that (in my mind) solves the immediate pain around wanting
a child-of operator (which I do), and Pierre-Yves's worry so we can
make progress.


More information about the Mercurial-devel mailing list