hgbook: chapter on templates
Mathias De Maré
mathias.demare at gmail.com
Sun Jul 24 02:48:12 EDT 2016
On Tue, Jul 19, 2016 at 10:04 PM, Augie Fackler <raf at durin42.com> wrote:
> On Tue, Jul 19, 2016 at 2:29 PM, Sean Farley <sean at farley.io> wrote:
> > Ah, this is very nice! Thanks for the work!
> Indeed! I even cleaned up my own custom templates a little thanks to
> reading through this.
Glad to hear the enthousiasm :)
A lot of it is modified from the original '--style' description Bryan gave,
so he deserves most of the credit.
On Tue, Jul 19, 2016 at 11:37 PM, Matt Mackall <mpm at selenic.com> wrote:
> On Mon, 2016-07-18 at 17:58 +0200, Mathias De Maré wrote:
> > Hello all,
> > it's been quite a while since I sent around another chapter. I'm afraid I
> > had other topics to focus on.
> > I've reworked the chapter 'Customizing the output of Mercurial' to
> > templates (rather than the old '--style' option).
> Other things to mention:
> - the -T option
> - the [templates] section (simplifies many of your templatealias examples)
Oh, good point. It also seems that this feature is not yet in the help, so
I'll try to add it there as well.
> - using a path to a template file
Do you mean using '%include'?
> - adding files to the template path
I'm not quite sure what you mean here. Is this about the use of the
'templates' directory relative to the 'hg' binary? I had to look this up in
the templater.py code, so it seems quite well hidden.
> - multi-line assignments and quoting in config files
> - hg debugcolor
> Things that are just about official and long-deployed:
> - generic templating of most of the other display commands
> - the generic JSON and XML styles
> - using -T json for discovery
> - how to assign different templates with the same name to different
Good idea. Just found out about this last one :-)
Thanks for the good suggestions, I'll look into these next!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mercurial-devel