# HG changeset patch # User Yuya Nishihara # Date 2018-04-01 13:41:49 # Node ID 8a5ee6aa88704e0a3d1baf004905ecfe2b3773de # Parent 034a422aeaff721ae81f7a973ef2e8afe2b0e2a2 hgweb: wrap {archives} with mappinglist No bare list of mappings should be put in a template mapping. diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py +++ b/mercurial/hgweb/hgwebdir_mod.py @@ -172,7 +172,7 @@ def rawindexentries(ui, repos, req, subd 'description_sort': "", 'lastchange': d, 'lastchange_sort': d[1] - d[0], - 'archives': [], + 'archives': templateutil.mappinglist([]), 'isdirectory': True, 'labels': templateutil.hybridlist([], name='label'), } diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py --- a/mercurial/hgweb/webutil.py +++ b/mercurial/hgweb/webutil.py @@ -35,6 +35,7 @@ from .. import ( scmutil, templatefilters, templatekw, + templateutil, ui as uimod, util, ) @@ -63,7 +64,7 @@ def archivelist(ui, nodeid, url=None): 'url': url, }) - return archives + return templateutil.mappinglist(archives) def up(p): if p[0:1] != "/":