[PATCH 4 of 5] templater: use named function to named template against mapping dict (API)

Yuya Nishihara yuya at tcha.org
Mon Mar 19 09:29:54 EDT 2018


On Mon, 19 Mar 2018 05:13:05 +0000, Martin von Zweigbergk wrote:
> On Sat, Mar 17, 2018 at 9:39 PM Yuya Nishihara <yuya at tcha.org> wrote:
> 
> > # HG changeset patch
> > # User Yuya Nishihara <yuya at tcha.org>
> > # Date 1521203972 -32400
> > #      Fri Mar 16 21:39:32 2018 +0900
> > # Node ID 73de63e4c72042110b744e0838556421c7acaba8
> > # Parent  38286983261c9f01bb71cd7994033cd3f96e8d38
> > templater: use named function to named template against mapping dict (API)
> >
> > And replace __call__(t, **mapping) in favor of generate(t, mapping). I
> > prefer
> > a named function here since the templater isn't a simple function-like
> > object.
> >
> > .. api::
> >
> >    The templater is no longer callable. Use ``templater.generate(t,
> > mapping)``
> >    instead of ``templater(t, **pycompat.strkwargs(mapping))``.
> >
> 
> This patch seems to break test-highlight.t. There seems to be a templater
> that's used as a callable on hgext/highlight/__init__.py:62

Oops, new version coming. Thanks for spotting it.


More information about the Mercurial-devel mailing list