Patchwork [4,of,4] help: rewrite template examples to use integer literals where appropriate

login
register
mail settings
Submitter Yuya Nishihara
Date May 10, 2015, 11:03 p.m.
Message ID <a5d32b5887c7f5eb719f.1431298998@mimosa>
Download mbox | patch
Permalink /patch/9014/
State Accepted
Headers show

Comments

Yuya Nishihara - May 10, 2015, 11:03 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1430549517 -32400
#      Sat May 02 15:51:57 2015 +0900
# Node ID a5d32b5887c7f5eb719f7c0ce08aa928e1ab21cd
# Parent  c3e6267cfb1f263d4a559709909951af0efed9d3
help: rewrite template examples to use integer literals where appropriate
Ryan McElroy - May 11, 2015, 7:44 p.m.
On 5/10/2015 4:03 PM, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1430549517 -32400
> #      Sat May 02 15:51:57 2015 +0900
> # Node ID a5d32b5887c7f5eb719f7c0ce08aa928e1ab21cd
> # Parent  c3e6267cfb1f263d4a559709909951af0efed9d3
> help: rewrite template examples to use integer literals where appropriate
>
> diff --git a/mercurial/help/templates.txt b/mercurial/help/templates.txt
> --- a/mercurial/help/templates.txt
> +++ b/mercurial/help/templates.txt
> @@ -67,7 +67,7 @@ Some sample command line templates:
>   
>   - Output the description set to a fill-width of 30::
>   
> -   $ hg log -r 0 --template "{fill(desc, '30')}"
> +   $ hg log -r 0 --template "{fill(desc, 30)}"
>   
>   - Use a conditional to test for the default branch::
>   
> @@ -104,4 +104,4 @@ Some sample command line templates:
>   
>   - Print the first word of each line of a commit message::
>   
> -   $ hg log --template "{word(\"0\", desc)}\n"
> +   $ hg log --template "{word(0, desc)}\n"
>

Sweet! I approve of this series.

Patch

diff --git a/mercurial/help/templates.txt b/mercurial/help/templates.txt
--- a/mercurial/help/templates.txt
+++ b/mercurial/help/templates.txt
@@ -67,7 +67,7 @@  Some sample command line templates:
 
 - Output the description set to a fill-width of 30::
 
-   $ hg log -r 0 --template "{fill(desc, '30')}"
+   $ hg log -r 0 --template "{fill(desc, 30)}"
 
 - Use a conditional to test for the default branch::
 
@@ -104,4 +104,4 @@  Some sample command line templates:
 
 - Print the first word of each line of a commit message::
 
-   $ hg log --template "{word(\"0\", desc)}\n"
+   $ hg log --template "{word(0, desc)}\n"