[PATCH] show: use labelcset() template alias for work (and stack) views

Gregory Szorc gregory.szorc at gmail.com
Thu Oct 19 17:19:35 EDT 2017


On Thu, Oct 19, 2017 at 4:10 PM, Yuya Nishihara <yuya at tcha.org> wrote:

> On Tue, 17 Oct 2017 21:01:48 +0200, Denis Laxalde wrote:
> > # HG changeset patch
> > # User Denis Laxalde <denis at laxalde.org>
> > # Date 1508264743 -7200
> > #      Tue Oct 17 20:25:43 2017 +0200
> > # Node ID 9af9aa26a601cf26aca9320d0384857fe09fa28b
> > # Parent  68e0bcb903572cb3641c1b1ac11bdcf47d4ff5ac
> > # EXP-Topic show-obs-info
> > show: use labelcset() template alias for work (and stack) views
> >
> > By reusing labelcset() template alias from map-cmdline.default we can now
> > display obsolescence information in `hg show work/stack`.
> >
> > diff --git a/mercurial/templates/map-cmdline.show
> b/mercurial/templates/map-cmdline.show
> > --- a/mercurial/templates/map-cmdline.show
> > +++ b/mercurial/templates/map-cmdline.show
> > @@ -1,8 +1,8 @@
> >  # TODO there are a few deficiencies in this file:
> >  # * The "namespace" of the labels needs to be worked out. We currently
> >  #   piggyback on existing values so color works.
> > -# * Obsolescence isn't considered for node labels. See _cset_labels in
> > -#   map-cmdline.default.
> > +
> > +%include map-cmdline.default
>
> As a side effect, 'hg log -Tshow' becomes an alias for -Tdefault. Perhaps,
> map-cmdline.show should be merged into map-cmdline.default.
>

I agree. map-cmdline.show's existence is mostly a side-effect of me a) not
fully understanding the templating code b) wanting to draw a clear boundary
between show's templates (which aren't covered by BC). We can call out
show's templates via inline code comments :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20171019/7e1081d9/attachment.html>


More information about the Mercurial-devel mailing list