Mercurial > hg-stable
changeset 37946: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 | bbff7170f665 |
children | 450de9cb0b36 |
files | mercurial/hgweb/webcommands.py mercurial/hgweb/webutil.py |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py Fri Apr 27 11:23:41 2018 -0400 +++ b/mercurial/hgweb/webcommands.py Mon Apr 02 00:00:29 2018 +0900 @@ -819,7 +819,7 @@ rename = webutil.renamelink(fctx) ctx = fctx else: - rename = [] + rename = templateutil.mappinglist([]) ctx = ctx return web.sendtemplate( @@ -892,7 +892,7 @@ rename = webutil.renamelink(fctx) ctx = fctx else: - rename = [] + rename = templateutil.mappinglist([]) ctx = ctx return web.sendtemplate(
--- a/mercurial/hgweb/webutil.py Fri Apr 27 11:23:41 2018 -0400 +++ b/mercurial/hgweb/webutil.py Mon Apr 02 00:00:29 2018 +0900 @@ -234,8 +234,8 @@ def renamelink(fctx): r = fctx.renamed() if r: - return [{'file': r[0], 'node': hex(r[1])}] - return [] + return templateutil.mappinglist([{'file': r[0], 'node': hex(r[1])}]) + return templateutil.mappinglist([]) def nodetagsdict(repo, node): return [{"name": i} for i in repo.nodetags(node)]