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

Sean Farley sean.michael.farley at gmail.com
Mon Oct 6 12:58:33 CDT 2014


Siddharth Agarwal writes:

> On 10/04/2014 09:57 AM, Sean Farley wrote:
>> # HG changeset patch
>> # User Sean Farley <sean.michael.farley at gmail.com>
>> # Date 1412441841 25200
>> #      Sat Oct 04 09:57:21 2014 -0700
>> # Node ID c3bd6d6457bf42d2fbcaba89cf0418a0d0604239
>> # Parent  78c916f24dd99a56e4c29153a5df3bd7d1c40edd
>> revset: allow negative integers to list child revs
>
> I like the idea of having a shorthand for children, but I'm not in 
> favour of the shorthand being to select particular children. I think the 
> shorthand we need is for 'all children' instead.

That's fair. Would you want to support index notation? e.g. X[N] for the
Nth child? It might get funky with ordering as Mads pointed out.

> I might be OK with '^-1' to mean 'all children'.

Yeah, that might be ok, too.


More information about the Mercurial-devel mailing list