json output using mercurial templates

Matt Hawley Matt.Hawley at microsoft.com
Mon Nov 29 13:24:26 CST 2010


With the basic conditionals what were you thinking? We'd love to adopt this for doing easy paging via the CodePlex web site vs the manual manipulation we currently do of hg.exe.

-----Original Message-----
From: mercurial-bounces at selenic.com [mailto:mercurial-bounces at selenic.com] On Behalf Of Matt Mackall
Sent: Wednesday, November 24, 2010 1:11 AM
To: Dirkjan Ochtman
Cc: Haszlakiewicz, Eric; mercurial at selenic.com
Subject: Re: json output using mercurial templates

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.


_______________________________________________
Mercurial mailing list
Mercurial at selenic.com
http://selenic.com/mailman/listinfo/mercurial



More information about the Mercurial mailing list