json output using mercurial templates

Matt Mackall mpm at selenic.com
Wed Nov 24 03:11:03 CST 2010


On Wed, 2010-11-24 at 10:00 +0100, Dirkjan Ochtman wrote:
> On Tue, Nov 23, 2010 at 18:02, Haszlakiewicz, Eric
> <EHASZLA at transunion.com> wrote:
> > For this you can use "last_<foo>", at least for some things.  Unfortunately, not all of the various properties are handled consistently, which is the real problem with the templater.
> > e.g. you can't use "start_extra" and "end_extra" with the "extras" values.
> >
> > How far were you able to get with this?  Do you have a partially working template map file that you can share?
> 
> I didn't get that far, I don't think the last_ thing is sufficient.
> Looks like I discarded my last attempt.

Hopefully I'll get around to making the template language more powerful
shortly. I plan to add:

- some basic conditionals
- filters with arguments
- inline subtemplates
- a nice list join function

This shouldn't be too hard to do with the simple parser tech I added for
revsets.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial mailing list