comparison mercurial/templatefuncs.py @ 39367:83f8f7b9fa60

templatekw: alias {file} of files list to {path} This is a part of the name unification. All {path}s will be changed to repository-absolute (i.e. canonical) paths. https://www.mercurial-scm.org/wiki/GenericTemplatingPlan#Dictionary
author Yuya Nishihara <yuya@tcha.org>
date Sun, 05 Aug 2018 16:14:18 +0900
parents a2a5d4ad5276
children 9458dbfa7f33
comparison
equal deleted inserted replaced
39366:a41497b5117c 39367:83f8f7b9fa60
138 138
139 raw = evalstring(context, mapping, args[0]) 139 raw = evalstring(context, mapping, args[0])
140 ctx = context.resource(mapping, 'ctx') 140 ctx = context.resource(mapping, 'ctx')
141 m = ctx.match([raw]) 141 m = ctx.match([raw])
142 files = list(ctx.matches(m)) 142 files = list(ctx.matches(m))
143 return templateutil.compatlist(context, mapping, "file", files) 143 return templateutil.compatfileslist(context, mapping, "file", files)
144 144
145 @templatefunc('fill(text[, width[, initialident[, hangindent]]])') 145 @templatefunc('fill(text[, width[, initialident[, hangindent]]])')
146 def fill(context, mapping, args): 146 def fill(context, mapping, args):
147 """Fill many 147 """Fill many
148 paragraphs with optional indentation. See the "fill" filter.""" 148 paragraphs with optional indentation. See the "fill" filter."""