hgweb: wrap {topics}es of help with mappinggenerator or mappinglist
authorYuya Nishihara <yuya@tcha.org>
Wed, 04 Apr 2018 20:51:49 +0900
changeset 38212 0b932b43868f
parent 38211 86f980a8cacf
child 38213 c3df415037cd
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.
mercurial/hgweb/webcommands.py
--- 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)