[PATCH 3 of 4] commands: add template support for identify
Yuya Nishihara
yuya at tcha.org
Tue Aug 30 10:10:38 EDT 2016
On Mon, 29 Aug 2016 17:44:44 +0200, Mathias De Maré wrote:
> On Tue, Aug 9, 2016 at 3:34 PM, Yuya Nishihara <yuya at tcha.org> wrote:
> > On Mon, 08 Aug 2016 21:08:39 -0400, Matt Harbison wrote:
> > > Also, not really a direct problem with this patch, though it opens the
> > > door to it. I saw the {tags} keyword, and tried using {latesttags()}
> > from
> > > the log templates. This prints a stacktrace. It's not clear to me to
> > > what extent these templates are expected to work together.
> > >
> > > It would probably be nice in the future to have keywords like
> > > {latesttags}, {changessincelatesttag}, etc on `hg id` to be able to build
> > > a string like `hg version`, but simpler than the magic currently required
> > > when using `hg log` to do the same. Also, I assume we can add {node} in
> > > the future, so that you don't need to use --debug to get the full hash?
> >
> > Yeah, I'm thinking of an API to associate ctx with the current item. In
> > order
> > to do that, each item should be mapped to a single revision, which means
> > we'll have to build [{"node": x}, ...] instead of [{"nodes": x, ...}].
>
> Do you prefer I solve the above listed issues and resubmit? Or is this
> patch in general not in the right direction?
Try fm.nested() to build a list of dicts. Full templating support can be
added later.
More information about the Mercurial-devel
mailing list