hgweb: wrap {archives} with mappinglist
No bare list of mappings should be put in a template mapping.
--- a/mercurial/hgweb/hgwebdir_mod.py Sun Apr 01 22:40:15 2018 +0900
+++ b/mercurial/hgweb/hgwebdir_mod.py Sun Apr 01 22:41:49 2018 +0900
@@ -172,7 +172,7 @@
'description_sort': "",
'lastchange': d,
'lastchange_sort': d[1] - d[0],
- 'archives': [],
+ 'archives': templateutil.mappinglist([]),
'isdirectory': True,
'labels': templateutil.hybridlist([], name='label'),
}
--- a/mercurial/hgweb/webutil.py Sun Apr 01 22:40:15 2018 +0900
+++ b/mercurial/hgweb/webutil.py Sun Apr 01 22:41:49 2018 +0900
@@ -35,6 +35,7 @@
scmutil,
templatefilters,
templatekw,
+ templateutil,
ui as uimod,
util,
)
@@ -63,7 +64,7 @@
'url': url,
})
- return archives
+ return templateutil.mappinglist(archives)
def up(p):
if p[0:1] != "/":