diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -1256,6 +1256,19 @@ def help(web, req, tmpl): return tmpl('helptopics', topics=topics, earlycommands=earlycommands, othercommands=othercommands, title='Index') + # Render an index of sub-topics. + if topicname in helpmod.subtopics: + topics = [] + for entries, summary, _doc in helpmod.subtopics[topicname]: + topics.append({ + 'topic': '%s.%s' % (topicname, entries[0]), + 'basename': entries[0], + 'summary': summary, + }) + + return tmpl('helptopics', topics=topics, title=topicname, + subindex=True) + u = webutil.wsgiui() u.verbose = True try: diff --git a/tests/test-help.t b/tests/test-help.t --- a/tests/test-help.t +++ b/tests/test-help.t @@ -2631,6 +2631,82 @@ Dish up an empty repo; serve it cold. +Sub-topic indexes rendered properly + + $ get-with-headers.py 127.0.0.1:$HGPORT "help/internals" + 200 Script output follows + + + + + + + + + + Help: internals + + + +
+ + +
+ + + + + + + + + + + + +

Topics

+ + bundles + + + container for exchange of repository data +
+ + changegroups + + + representation of revlog data +
+
+
+ + + + + + + + $ killdaemons.py #endif