--- a/mercurial/templateutil.py Fri Mar 16 23:01:51 2018 +0900
+++ b/mercurial/templateutil.py Fri Mar 16 23:09:21 2018 +0900
@@ -348,8 +348,11 @@
v = default
if callable(v) and getattr(v, '_requires', None) is None:
# old templatekw: expand all keywords and resources
+ # (TODO: deprecate this after porting web template keywords to new API)
props = {k: f(context, mapping, k)
for k, f in context._resources.items()}
+ # pass context to _showcompatlist() through templatekw._showlist()
+ props['templ'] = context
props.update(mapping)
return v(**pycompat.strkwargs(props))
if callable(v):