mercurial/templateutil.py
changeset 37070 1101d6747d2d
parent 37068 aa97e06a1912
child 37073 44757e6dad93
--- 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):