[PATCH 5 of 5] template: add successors template

Jun Wu quark at fb.com
Fri Jul 7 13:58:44 EDT 2017


Excerpts from Martin von Zweigbergk's message of 2017-07-07 10:39:55 -0700:
> Boris described it as "closest successors", so maybe "closestsuccessors"?

Maybe a bit off-topic, but I have been thinking about "predecessors" and
"successors" revsets for a while. It sounds like we could have many
combinations so I was thinking about keyword arguments, like:

    successors(REV, all=False, closest=False)

For example, with two markers: A -> (B, C), B -> (D),

    successors(A) = [C, D]
    successors(A, all=True) = [B, C, D]
    successors(A, closest=True) = [C] (without --hidden)
                                  [B, C] (with --hidden)

Also check my comment on Yuya's revset change [1].

I wonder if we can just implement the revsets, and because there is a
"revset" template function, template gets those features for free.

[1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-July/101140.html


More information about the Mercurial-devel mailing list