NewLine handling in templates

Tony Mechelynck antoine.mechelynck at gmail.com
Wed Dec 14 13:20:04 UTC 2022


On Wed, Nov 16, 2022 at 11:23 PM Ernie Rael <errael at raelity.com> wrote:
>
> Hi all,
>
> I don't use templates much, I'm running into something that doesn't seem
> to make sense. I guess it's a bug in glog. Wondering if I'm
> understanding things correctly.
>
> I want to include some bookmark info in a template I use to summarize log.
>
> It looks like the trailing "\n" in the first template gets lost when
> there are bookmarks present, and this seems to be confirmed by the
> second template which uses "{if(bookmarks, '\n')}" as a fixup. The
> behavior using log instead of glog is as expected.
[...]

The glog extension is deprecated; it can be replaced by an alias
"glog" with the value "log -G".

If you add the lines
[alias]
glog = log -G

at the top of your Mercurial.ini or hgrc (/etc/mercurial/hgrc or
~/.hgrc or whatever) and disable the glog extension, do you get the
desired output from glog as newly defined?

Best regards,
Tony.


More information about the Mercurial mailing list