[PATCH 3 of 4] templates: add "changeset.obsolete" label in command line style
Yuya Nishihara
yuya at tcha.org
Sun Mar 26 09:51:53 EDT 2017
On Sat, 25 Mar 2017 14:09:18 +0100, Denis Laxalde wrote:
> # HG changeset patch
> # User Denis Laxalde <denis at laxalde.org>
> # Date 1490434829 -3600
> # Sat Mar 25 10:40:29 2017 +0100
> # Node ID 94a70894c394268b845f427f7643738a70e336bb
> # Parent c4c825f1402861e4b988395ac3deebcc6b5292cf
> # Available At https://bitbucket.org/dlax/hg-work
> # hg pull https://bitbucket.org/dlax/hg-work -r 94a70894c394
> # EXP-Topic obsolete-ui
> templates: add "changeset.obsolete" label in command line style
>
> Following respective change in cmdutil.changeset_printer.
>
> 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,7 +29,7 @@ lfile_copies_switch = '{if(file_copies_s
>
> # General templates
> _trouble_label = 'trouble.{trouble}'
> -_cset_labels = 'log.changeset changeset.{phase}{if(troubles, " changeset.troubled {troubles%_trouble_label}")}'
> +_cset_labels = 'log.changeset changeset.{phase}{if(obsolete, " changeset.obsolete")}{if(troubles, " changeset.troubled {troubles%_trouble_label}")}'
> cset = '{label("{_cset_labels}",
> "changeset: {rev}:{node|short}")}\n'
Looks good. Optionally you might want to use separate(' ', ...) function
to make this look better.
More information about the Mercurial-devel
mailing list