diff -r d64ae4fef471 -r 44757e6dad93 mercurial/templateutil.py --- a/mercurial/templateutil.py Thu Mar 15 20:27:38 2018 +0900 +++ b/mercurial/templateutil.py Thu Mar 15 20:43:39 2018 +0900 @@ -349,8 +349,8 @@ 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()} + props = {k: context._resources.lookup(context, mapping, k) + for k in context._resources.knownkeys()} # pass context to _showcompatlist() through templatekw._showlist() props['templ'] = context props.update(mapping)