[PATCH] templates: add ChangeLog example with built-in style

timeless timeless at gmail.com
Mon Jun 27 19:17:33 EDT 2016


I'm not sure -T changelog is frozen -- And by documenting things,
we're freezing them.

I'm pretty sure we aren't promising it's a ~GNU changelog~.

I do have half plans to try to improve the footer for commands that
offer `-T` to include a `(see hg help templates)` note. But doing that
should involve a bunch of other things (one being rolling up all `see
XX`'s into a single list, otherwise it floods..., I haven't thought
through the rest).


On Sun, Jun 26, 2016 at 3:41 PM, Arne Babenhauserheide <arne_bab at web.de> wrote:
>
> Yuya Nishihara writes:
>
>> On Fri, 24 Jun 2016 12:37:55 +0200, Arne Babenhauserheide wrote:
>>> # HG changeset patch
>>> # User drak at kaverne
>>> # Date 1466762655 -7200
>>> #      Fri Jun 24 12:04:15 2016 +0200
>>> # Node ID ad1115eedd4201f57a223836dd357db1f3569ca7
>>> # Parent  63fad6235369b54dd3accf1a512b278ba65e1c0a
>>> templates: add ChangeLog example with built-in style
>>>
>>> diff -r 63fad6235369 -r ad1115eedd42 mercurial/help/templates.txt
>>> --- a/mercurial/help/templates.txt   Tue Jun 21 17:15:51 2016 +0100
>>> +++ b/mercurial/help/templates.txt   Fri Jun 24 12:04:15 2016 +0200
>>> @@ -145,3 +145,7 @@
>>>  - Print the first word of each line of a commit message::
>>>
>>>     $ hg log --template "{word(0, desc)}\n"
>>> +
>>> +- Print a GNU style ChangeLog using the built-in changelog style::
>>> +
>>> +   $ hg log --template changelog
>>
>> It seems redundant since it's described in the first part of the help.
>>
>> https://selenic.com/repo/hg/help/template
>
> Thank you for your answer!
>
> I wrote this patch, because I did not see that when I checked `hg help
> templates` (it’s near the top. I’m used to getting everything I need
> From the bottom of `hg help <command>`). So I suspect that it is likely
> that others would also overlook it.
>
> But you’re right that duplication of information wouldn’t be useful.
>
> Do you have an idea how to make this feature easier to discover in
> another way?
>
> The text currently does not say that the output from -T changelog
> provides a GNU style changelog. Being able to get a GNU style changelog
> by simply specifying -T changelog is great feature (try to search for
> “create GNU style ChangeLog” to see how many people need that) which the
> help page currently does not show.
>
> Best wishes,
> Arne
> --
> Unpolitisch sein
> heißt politisch sein
> ohne es zu merken
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>


More information about the Mercurial-devel mailing list