comparison mercurial/hgweb/webutil.py @ 37902:2095331ff926

hgweb: wrap {rename} with mappinglist No bare list of mappings should be put in a template mapping.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 02 Apr 2018 00:00:29 +0900
parents 495fbeae63cc
children 450de9cb0b36
comparison
equal deleted inserted replaced
37901:bbff7170f665 37902:2095331ff926
232 return _siblings(ctx.children(), hide) 232 return _siblings(ctx.children(), hide)
233 233
234 def renamelink(fctx): 234 def renamelink(fctx):
235 r = fctx.renamed() 235 r = fctx.renamed()
236 if r: 236 if r:
237 return [{'file': r[0], 'node': hex(r[1])}] 237 return templateutil.mappinglist([{'file': r[0], 'node': hex(r[1])}])
238 return [] 238 return templateutil.mappinglist([])
239 239
240 def nodetagsdict(repo, node): 240 def nodetagsdict(repo, node):
241 return [{"name": i} for i in repo.nodetags(node)] 241 return [{"name": i} for i in repo.nodetags(node)]
242 242
243 def nodebookmarksdict(repo, node): 243 def nodebookmarksdict(repo, node):