Patchwork templates: add ChangeLog example with built-in style

login
register
mail settings
Submitter arne_bab at web.de
Date June 24, 2016, 10:37 a.m.
Message ID <87eg7mrhuz.fsf@web.de>
Download mbox | patch
Permalink /patch/15600/
State Changes Requested
Delegated to: Yuya Nishihara
Headers show

Comments

arne_bab at web.de - June 24, 2016, 10:37 a.m.
# HG changeset patch
# User drak@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
Yuya Nishihara - June 24, 2016, 1:30 p.m.
On Fri, 24 Jun 2016 12:37:55 +0200, Arne Babenhauserheide wrote:
> # HG changeset patch
> # User drak@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
arne_bab at web.de - June 26, 2016, 7:41 p.m.
Yuya Nishihara writes:

> On Fri, 24 Jun 2016 12:37:55 +0200, Arne Babenhauserheide wrote:
>> # HG changeset patch
>> # User drak@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
timeless - June 27, 2016, 11:17 p.m.
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@web.de> wrote:
>
> Yuya Nishihara writes:
>
>> On Fri, 24 Jun 2016 12:37:55 +0200, Arne Babenhauserheide wrote:
>>> # HG changeset patch
>>> # User drak@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@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
Yuya Nishihara - June 28, 2016, 12:53 p.m.
On Mon, 27 Jun 2016 19:17:33 -0400, timeless wrote:
> 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~.

Built-in log styles should be covered by our compatibility rules. So if it
is currently a GNU style changelog, that won't change.

Maybe we can rephrase "Example usage:" as something like "Example to
print a GNU style ChangeLog" ?

Patch

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