[PATCH 1 of 2] templates: add whyunstable template keyword
Anton Shestakov
av6 at dwimlabs.net
Sat Apr 14 08:50:19 EDT 2018
On Sat, 14 Apr 2018 21:03:23 +0900
Yuya Nishihara <yuya at tcha.org> wrote:
> On Sat, 14 Apr 2018 19:43:15 +0800, Anton Shestakov wrote:
> > # HG changeset patch
> > # User Anton Shestakov <av6 at dwimlabs.net>
> > # Date 1522054812 -28800
> > # Mon Mar 26 17:00:12 2018 +0800
> > # Node ID 987c05eac1801d0b919c874280d03f9e8cccb411
> > # Parent 8bacc09814ba5500d15fb40c472e84cb95ae2f99
> > templates: add whyunstable template keyword
>
> Queued, thanks.
>
> > + at templatekeyword('whyunstable', requires={'repo', 'ctx'})
> > +def showwhyunstable(context, mapping):
> > + """List of dicts explaining all instabilities of a changeset.
> > + (EXPERIMENTAL)
> > + """
> > + repo = context.resource(mapping, 'repo')
> > + ctx = context.resource(mapping, 'ctx')
> > +
> > + def formatnode(ctx):
> > + return ' %s (%s)' % (scmutil.formatchangeid(ctx), ctx.phasestr())
>
> Nit: leading ' ' isn't nice when you join() the list.
I was trying to avoid something like '{if(divergentnodes, " ")}', but
maybe it wouldn't be too bad. I'll come back to this tomorrow.
More information about the Mercurial-devel
mailing list