hgweb: wrap {topics}es of help with mappinggenerator or mappinglist
The former 'topics' was a generator function, and the latter was a list of
mappings.
--- a/mercurial/hgweb/webcommands.py Wed Apr 04 20:48:37 2018 +0900
+++ b/mercurial/hgweb/webcommands.py Wed Apr 04 20:51:49 2018 +0900
@@ -1398,7 +1398,7 @@
topicname = web.req.qsparams.get('node')
if not topicname:
- def topics(**map):
+ def topics(context):
for entries, summary, _doc in helpmod.helptable:
yield {'topic': entries[0], 'summary': summary}
@@ -1427,7 +1427,7 @@
return web.sendtemplate(
'helptopics',
- topics=topics,
+ topics=templateutil.mappinggenerator(topics),
earlycommands=earlycommands,
othercommands=othercommands,
title='Index')
@@ -1444,7 +1444,7 @@
return web.sendtemplate(
'helptopics',
- topics=topics,
+ topics=templateutil.mappinglist(topics),
title=topicname,
subindex=True)