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

Matt Mackall mpm at selenic.com
Fri Dec 28 18:23:15 CST 2012


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)

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list