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

Martin von Zweigbergk martinvonz at google.com
Mon Mar 19 01:13:05 EDT 2018


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20180319/b95d90ef/attachment.html>


More information about the Mercurial-devel mailing list