First pieces of generic templating support

Matt Mackall mpm at selenic.com
Tue Feb 21 20:05:47 CST 2012


On Tue, 2012-02-21 at 20:50 -0500, Greg Ward wrote:
> On 20 February 2012, Matt Mackall said:
> > So I've set a goal of adding "generic templating", which means:
> > 
> > - it should be possible to use templating for all commands
> > - there should be some built-in styles like JSON, XML, and pickle
> > - it should be relatively painless to convert existing code
> > - performance impact should be minimal when not in use
> > 
> > At this point I've introduced the basic interface, added a simple debug
> > mode, and converted the status command. So we can now get output like
> > this:
> > 
> > $ hg st --config ui.formatdebug=1
> > status = {
> >     {'status': '?', 'char': 'branches.txt'},
> 
> Hope I'm not getting distracted by something semi-relevant, but why is
> the filename labelled 'char'? Wouldn't something like ... oh, I dunno
> ... 'filename' or 'path' make more sense here? 

Thinko on my part. It should be path. 'char' is the name of a nearby
variable in the code. Fixed.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list