diff mercurial/templater.py @ 36591:121a20e5da56

templatekw: switch most of showlist template keywords to new API (issue5779) Non-trivial changes will follow.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 25 Feb 2018 16:45:44 +0900
parents 7f6be7121b28
children 2da414105809
line wrap: on
line diff
--- a/mercurial/templater.py	Sun Feb 25 16:22:55 2018 +0900
+++ b/mercurial/templater.py	Sun Feb 25 16:45:44 2018 +0900
@@ -722,10 +722,7 @@
     ctx = context.resource(mapping, 'ctx')
     m = ctx.match([raw])
     files = list(ctx.matches(m))
-    # TODO: pass (context, mapping) pair to keyword function
-    props = context._resources.copy()
-    props.update(mapping)
-    return templatekw.showlist("file", files, props)
+    return templatekw.compatlist(context, mapping, "file", files)
 
 @templatefunc('fill(text[, width[, initialident[, hangindent]]])')
 def fill(context, mapping, args):