[PATCH 1 of 3] identify: change p1/p2 to a list of parents
Yuya Nishihara
yuya at tcha.org
Wed Jun 28 10:14:06 EDT 2017
On Tue, 27 Jun 2017 21:44:35 -0400, Matt Harbison wrote:
> On Mon, 26 Jun 2017 09:17:59 -0400, Yuya Nishihara <yuya at tcha.org> wrote:
> Related to this example, I noticed that the RHS of 'revset(..) %' isn't
> reevaluated for fields injected with fm.data(). I'm guessing it's caching
> for performance. But:
>
> $ ../hg identify -r '4.2' -T '{revset("tagged() and rev(%d)::", rev) %
> "{rev}\n"}'
> 35618
> 36319
>
> vs an injected field:
>
> $ ../hg identify -r '4.2' -T '{revset("tagged() and rev(%d)::", rev) %
> "{tags % "{tag}"}\n"}'
> 4.2
> 4.2
Good catch. Can you file a bug report? I don't think I can work on this
issue right now.
> That query works fine if I comment out 'fm.data(tags=...)':
>
> $ ../hg identify -r '4.2' -T '{revset("tagged() and rev(%d)::", rev) %
> "{tags % "{tag}"}\n"}'
> 4.2
> 4.2.1
>
> Maybe it's a small reason to automatically populate the ctx attributes in
> json, so that these don't need to be manually set in the formatter?
Perhaps. More complete fix would be to make templater drop overrides of
ctx-deriving keywords, but that isn't easy because keyword functions live
in the same dict.
More information about the Mercurial-devel
mailing list