[PATCH 5 of 5] template: add successors template

Yuya Nishihara yuya at tcha.org
Thu Jul 6 10:14:15 EDT 2017


On Wed, 05 Jul 2017 22:53:58 +0200, Boris Feld wrote:
> # HG changeset patch
> # User Boris Feld <boris.feld at octobus.net>
> # Date 1499073720 -7200
> #      Mon Jul 03 11:22:00 2017 +0200
> # Node ID 82e2b4eb96b573dde890d725d758dbbc49407133
> # Parent  870bfaafd90e030b85b869922050be98f000a9a9
> # EXP-Topic successorstemplate
> template: add successors template

> + at templatekeyword("successorssets")
> +def showsuccessorssets(repo, ctx, **args):
> +    """Returns a string of sets of successors for a changectx
> +
> +    Format used is: [ctx1, ctx2], [ctx3] if ctx has been splitted into ctx1 and
> +    ctx2 while also diverged into ctx3"""
> +    if not ctx.obsolete():
> +        return ''

Perhaps it should return an empty list.


More information about the Mercurial-devel mailing list