[PATCH 4 of 5 V4] templates: display evolution "troubles" in command line style

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu Jan 5 14:50:22 EST 2017



On 01/05/2017 04:16 PM, Yuya Nishihara wrote:
> On Wed, 4 Jan 2017 17:23:52 +0100, Pierre-Yves David wrote:
>> On 01/03/2017 01:54 PM, Denis Laxalde wrote:
>>> # HG changeset patch
>>> # User Denis Laxalde <denis.laxalde at logilab.fr>
>>> # Date 1478597306 -3600
>>> #      Tue Nov 08 10:28:26 2016 +0100
>>> # Node ID 92c6feb3e6556115847482dd82b9f40cf6696556
>>> # Parent  412f8e24f48c8f7006f826a3eeb41f9521c53e4f
>>> # EXP-Topic evolve-ui
>>> templates: display evolution "troubles" in command line style
>
>>> + at templatekeyword('trouble')
>
> Perhaps this should be 'troubles' ?

Good catch, we use "bookmark: " in the output but "{bookmarks}" in the 
template. We should do the same for troubles.

>>> +def showtroubles(**args):
>>> +    """List of evolution troubles of this changeset."""
>>> +    return showlist('trouble', args['ctx'].troubles(), **args)
>
>>> +_trouble_label = 'trouble.{trouble}'
>>> +_cset_labels = 'log.changeset changeset.{phase}{if(troubles, " changeset.troubled {troubles%_trouble_label}")}'
>
> Here 'troubles' keyword is used, and mapped to each singular 'trouble' element.

Cheers,

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list