diff mercurial/help.py @ 27376:fc810d950278

help: add "internals" topic We introduce the "internals" help topic, which renders an index of available sub-topics. The sub-topics themselves are still not reachable via the help system.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 13 Dec 2015 10:35:03 -0800
parents c4a062d090ee
children d1c998d7b103
line wrap: on
line diff
--- a/mercurial/help.py	Sun Dec 13 10:45:27 2015 -0800
+++ b/mercurial/help.py	Sun Dec 13 10:35:03 2015 -0800
@@ -161,6 +161,21 @@
 
     return loader
 
+internalstable = sorted([
+    (['bundles'], _('container for exchange of repository data'),
+     loaddoc('bundles', subdir='internals')),
+    (['changegroups'], _('representation of revlog data'),
+     loaddoc('changegroups', subdir='internals')),
+])
+
+def internalshelp(ui):
+    """Generate the index for the "internals" topic."""
+    lines = []
+    for names, header, doc in internalstable:
+        lines.append(' :%s: %s' % (names[0], header))
+
+    return '\n'.join(lines)
+
 helptable = sorted([
     (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
     (["dates"], _("Date Formats"), loaddoc('dates')),
@@ -187,6 +202,8 @@
     (["phases"], _("Working with Phases"), loaddoc('phases')),
     (['scripting'], _('Using Mercurial from scripts and automation'),
      loaddoc('scripting')),
+    (['internals'], _("Technical implementation topics"),
+     internalshelp),
 ])
 
 # Map topics to lists of callable taking the current topic help and