[PATCH 2 of 6 RFC] templater: wrap each parsed element with a label filter

Sean Farley sean.michael.farley at gmail.com
Sat Dec 29 00:32:29 UTC 2012


On Fri, Dec 28, 2012 at 6:23 PM, Matt Mackall <mpm at selenic.com> wrote:
> On Fri, 2012-12-28 at 18:11 -0600, Sean Farley wrote:
>> >> Ok, I can do that. Out of curiosity, how will labeling work in the
>> >> GenericTemplating plan?
>> >
>> > As here: manually.
>>
>> Well, a potential downside to this that I immediately see is not
>> having a way to get access to the current context's data from the
>> command line, e.g. the phase. Something hackish could be done in the
>> form of:
>
>> if 'log.changeset' in label:
>>   label += ' changeset.' + ctx.phasestr()
>
> What about:
>
> label('changeset.{phase}', expr)

Because ... I am an idiot.



More information about the Mercurial-devel mailing list