[PATCH 2 of 4] templatekw: add an "obsolete" keyword
Yuya Nishihara
yuya at tcha.org
Sun Mar 26 09:50:38 EDT 2017
On Sat, 25 Mar 2017 14:09:17 +0100, Denis Laxalde wrote:
> # HG changeset patch
> # User Denis Laxalde <denis at laxalde.org>
> # Date 1490434451 -3600
> # Sat Mar 25 10:34:11 2017 +0100
> # Node ID c4c825f1402861e4b988395ac3deebcc6b5292cf
> # Parent 130358da2eb894aa04e3bb731d0ccae84205c2ba
> # Available At https://bitbucket.org/dlax/hg-work
> # hg pull https://bitbucket.org/dlax/hg-work -r c4c825f14028
> # EXP-Topic obsolete-ui
> templatekw: add an "obsolete" keyword
>
> This keyword is a Boolean that indicates if a changeset is obsolete.
>
> diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
> --- a/mercurial/templatekw.py
> +++ b/mercurial/templatekw.py
> @@ -514,6 +514,12 @@ def shownode(repo, ctx, templ, **args):
> """
> return ctx.hex()
>
> + at templatekeyword('obsolete')
> +def showobsolete(repo, ctx, templ, **args):
> + """Boolean. True if this changeset is obsolete.
> + """
> + return ctx.obsolete()
Seems fine, but this conflicts with the string version provided by evolve.
Have we decided to switch to boolean?
More information about the Mercurial-devel
mailing list