Writing a template which displays only relevant parents

Dr Rainer Woitok rainer.woitok at gmail.com
Tue Feb 9 18:54:52 UTC 2016


Yuya,

On Tuesday, 2016-02-09 00:32:27 +0900, you wrote:

> ...
> It worked for me:
> 
> [ui]
> logtemplate = rev: {
>               rev
>               } node: {short(
>               node)}\n

Well,  your example works for me, too.   Experimenting a  little further
with my failed attempts to break  my "log" template into multiple lines,
I found that you can only break the template into multiple lines,  if it
either does  not contain any  escaped quotes,  or if the  whole template
definition is included in quotes.   If the multiple line template is not
a string,  neither `\"´ nor `\'´ are accepted,  while `\n´ is.   Is this
the way it should work?

> ...
> {"{"{rev}"}"} is fully valid since Mercurial 3.5.

That's perhaps a little bit  surprising  at first glance and should thus
be pointed out more clearly in the documentation.

> ...
> > ... [ on calling templates from within templates ]
> > Is there already some time-line or version-line for this new feature?
> 
> No. Please watch the issue if you're interested in.
> 
> https://bz.mercurial-scm.org/show_bug.cgi?id=4842

Will do.  Thanks for the pointer :-)

Sincerely,
  Rainer



More information about the Mercurial mailing list