changeset 38224:0b932b43868f

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.
author Yuya Nishihara <yuya@tcha.org>
date Wed, 04 Apr 2018 20:51:49 +0900
parents 86f980a8cacf
children c3df415037cd
files mercurial/hgweb/webcommands.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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)