[PATCH evolve-ext] templatekw: do not override in-core {obsolete} keyword
Boris FELD
boris.feld at octobus.net
Fri Oct 19 16:06:21 UTC 2018
I was checking the in-flight patches and saw that we never acknowledge
the reception of those patches.
Thank you, they have been merged in evolve.
Sorry about the delay.
On 08/08/2018 17:21, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1533727294 -32400
> # Wed Aug 08 20:21:34 2018 +0900
> # Node ID f5ad6b61447577fc501b244c340a614bb6b68355
> # Parent 544f394997aa18727c7e6e13f4b9ef3d98d009c9
> templatekw: do not override in-core {obsolete} keyword
>
> The extension version uses old API, which will be deprecated in Mercurial 4.8.
>
> diff --git a/hgext3rd/evolve/templatekw.py b/hgext3rd/evolve/templatekw.py
> --- a/hgext3rd/evolve/templatekw.py
> +++ b/hgext3rd/evolve/templatekw.py
> @@ -26,13 +26,15 @@ eh = exthelper.exthelper()
> ### template keywords
> # XXX it does not handle troubles well :-/
>
> - at eh.templatekw('obsolete')
> -def obsoletekw(repo, ctx, templ, **args):
> - """String. Whether the changeset is ``obsolete``.
> - """
> - if ctx.obsolete():
> - return 'obsolete'
> - return ''
> +if not util.safehasattr(templatekw, 'showobsolete'):
> + # hg < 4.2
> + @eh.templatekw('obsolete')
> + def obsoletekw(repo, ctx, templ, **args):
> + """String. Whether the changeset is ``obsolete``.
> + """
> + if ctx.obsolete():
> + return 'obsolete'
> + return ''
>
> if util.safehasattr(templatekw, 'compatlist'):
> @eh.templatekw('troubles', requires=set(['ctx', 'templ']))
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list