[PATCH 3 of 3] revset: let followlines also return descendants of startrev

Yuya Nishihara yuya at tcha.org
Mon Jan 16 09:08:05 EST 2017


On Mon, 16 Jan 2017 12:03:31 +0100, Denis Laxalde wrote:
> # HG changeset patch
> # User Denis Laxalde <denis.laxalde at logilab.fr>
> # Date 1484555087 -3600
> #      Mon Jan 16 09:24:47 2017 +0100
> # Node ID a94f01902574a02c64df58fda3a0ca3398a4c8b8
> # Parent  69653aeb724d00f3db816670896c2b974c9aa39b
> # EXP-Topic linerange-log/revset-descendants
> revset: let followlines also return descendants of startrev
> 
> This is useful to follow changes in a block of lines forward in the history
> (for instance, when one wants to find out how a function evolved from a point
> in history).

I agree it's useful, but I don't think it's good idea to merge these functions
into one because:

 a) other functions (e.g. ancestors(), descendants(), follow()) don't walk for
    both directions
 b) scanning descendants would (probably) double the calculation cost
 c) we can easily concatenate them by + operator (and define alias as necessary)

Perhaps the heard part would be to give a name to the descending followlines()
function, but I haven't come up with that. :)


More information about the Mercurial-devel mailing list