[PATCH 2 of 6] templates: change default style to display p1rev/node with "+" for wdir
Yuya Nishihara
yuya at tcha.org
Fri Jul 3 07:15:25 CDT 2015
On Fri, 03 Jul 2015 00:17:01 +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1426333001 -32400
> # Sat Mar 14 20:36:41 2015 +0900
> # Node ID 8f50b986609b29dd28049ce145e39c3671c78c37
> # Parent cf8091ddb4c8555580d64e352581689d2901d478
> templates: change default style to display p1rev/node with "+" for wdir
>
> This is what cmdutil.changeset_printer does. The default template should
> do the same way.
>
> Because wdir() is still experimental, the output of "log -r'wdir()' -Tdefault"
> may change in future.
>
> diff --git a/mercurial/templates/map-cmdline.default b/mercurial/templates/map-cmdline.default
> --- a/mercurial/templates/map-cmdline.default
> +++ b/mercurial/templates/map-cmdline.default
> @@ -29,19 +29,25 @@ lfile_copies_switch = '{if(file_copies_s
>
> # General templates
> cset = '{label("log.changeset changeset.{phase}",
> - "changeset: {rev}:{node|short}")}\n'
> + "changeset: {ifeq(node, 'ffffffffffffffffffffffffffffffffffffffff',
> + '{p1rev}:{p1node|short}+',
> + '{rev}:{node|short}')}")}\n'
Please disregard the PATCH 2. The other patches can be applied without this.
I think I should rewrite changeset_printer to eliminate this kind of "if"s.
% hg log -r'wdir()'
changeset: 2147483647:ffffffffffff
parent: 29917:d3d2ba265e17
...
More information about the Mercurial-devel
mailing list