hgweb: wrap {earlycommands} and {othercommands} of help with mappinggenerator
authorYuya Nishihara <yuya@tcha.org>
Wed, 04 Apr 2018 20:53:16 +0900
changeset 38213 c3df415037cd
parent 38212 0b932b43868f
child 38214 2aa0217bb655
hgweb: wrap {earlycommands} and {othercommands} of help with mappinggenerator They were generators of mappings.
mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py	Wed Apr 04 20:51:49 2018 +0900
+++ b/mercurial/hgweb/webcommands.py	Wed Apr 04 20:53:16 2018 +0900
@@ -1417,19 +1417,19 @@
         early.sort()
         other.sort()
 
-        def earlycommands(**map):
+        def earlycommands(context):
             for c, doc in early:
                 yield {'topic': c, 'summary': doc}
 
-        def othercommands(**map):
+        def othercommands(context):
             for c, doc in other:
                 yield {'topic': c, 'summary': doc}
 
         return web.sendtemplate(
             'helptopics',
             topics=templateutil.mappinggenerator(topics),
-            earlycommands=earlycommands,
-            othercommands=othercommands,
+            earlycommands=templateutil.mappinggenerator(earlycommands),
+            othercommands=templateutil.mappinggenerator(othercommands),
             title='Index')
 
     # Render an index of sub-topics.