[PATCH 1 of 3] commands: unify template output to use name (BC)

Matt Mackall mpm at selenic.com
Sat Apr 16 17:25:29 EDT 2016


On Sat, 2016-04-16 at 01:14 +0900, Yuya Nishihara wrote:
> On Wed, 13 Apr 2016 12:14:34 -0500, timeless wrote:
> > 
> > # HG changeset patch
> > # User timeless <timeless at mozdev.org>
> > # Date 1456505030 0
> > #      Fri Feb 26 16:43:50 2016 +0000
> > # Node ID 57f09cb9c2e69b0e8ef89cd21758722ba7e07ff6
> > # Parent  02be5fc18c0c70c087a9d1ab5ffe5afce926f227
> > commands: unify template output to use name (BC)
> > 
> > Before this, hg bookmarks -T... and hg tags -T used
> > bookmark/tag respectively for the name of the repesective
> > bookmark/tag, but it is really a name, and there is no reason to
> > repeat "bookmark" or "tag" in a command named "bookmarks" or "tags",
> > obviously the things you will get will be bookmarks or tags.
> > 
> > {tag} and {bookmark} remain available for backwards compatibility.
> This looks okay to me, though I don't know how great it will be to provide
> the "name" keyword.

Yeah, I dunno. Currently, our list-like elements (grep for showlist in
templatekw.py) work like:

{files % "file: {file}\n"}

In the spirit of allowing the user to discover the available template structure
via -Tjson, we should probably match the existing element names.

Going to drop this until 3.9 opens up.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list