# HG changeset patch # User Yuya Nishihara # Date 2018-04-04 11:51:49 # Node ID 0b932b43868f9eafb918d6685041ff0cb0af7f07 # Parent 86f980a8cacf49b6d5822e868fd7b43351571ca4 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. diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -1398,7 +1398,7 @@ def help(web): 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 @@ def help(web): return web.sendtemplate( 'helptopics', - topics=topics, + topics=templateutil.mappinggenerator(topics), earlycommands=earlycommands, othercommands=othercommands, title='Index') @@ -1444,7 +1444,7 @@ def help(web): return web.sendtemplate( 'helptopics', - topics=topics, + topics=templateutil.mappinglist(topics), title=topicname, subindex=True)