Template keyword for all "names"

Gregory Szorc gregory.szorc at gmail.com
Mon Jan 11 18:56:04 UTC 2016


On Wed, Dec 23, 2015 at 8:38 PM, timeless <timeless at gmail.com> wrote:

> Would it be possible to do this with just a {namespaces} and a lot of %
> magic?
>
> that would enable something theoretically of the form:
>
> {namespaces % "{name}:\t{{name}}\n"}
>

I /think/ templatekw._hybrid can be used for this.

I tried to take a stab at implementing this, but I don't fully grok all the
magic with _showlist() and _hybrid() :/ Is there any chance someone else
can take a look before the code freeze so we can get something in 3.7?


>
> On Wed, Dec 23, 2015 at 11:17 PM, Sean Farley <sean at farley.io> wrote:
> >
> > Gregory Szorc <gregory.szorc at gmail.com> writes:
> >
> >> `hg log` prints out all names from all namespaces by default.
> >>
> >> The namespaces API magically generates a template keyword using
> >> templatekw.shownames(), making it available for templating usage.
> >>
> >> However, we don't appear to have a template keyword that expands to all
> >> names attached to a changeset. That feels like an important facility to
> >> have, as otherwise it requires all templates to have knowledge of all
> >> custom namespaces, which isn't feasible.
> >>
> >> Is there a plan to add a {names} (or similar)? Has the user-facing
> >> terminology been bikeshedded yet?
> >
> > If I remember correctly, it was just an oversight to get namespaces in
> > before a freeze. Let the bikeshedding games begin!
> > _______________________________________________
> > Mercurial-devel mailing list
> > Mercurial-devel at selenic.com
> > https://selenic.com/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20160111/592742b6/attachment.html>


More information about the Mercurial-devel mailing list