mercurial/hgweb/webcommands.py
changeset 27581 3aa6a8135557
parent 27294 5aa2afb4f81a
child 27582 8f8f3b13252d
--- a/mercurial/hgweb/webcommands.py	Wed Dec 30 17:26:33 2015 -0700
+++ b/mercurial/hgweb/webcommands.py	Wed Dec 30 17:34:51 2015 -0700
@@ -1256,6 +1256,19 @@
         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: