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.
--- 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
--- a/tests/test-globalopts.t Sun Dec 13 10:45:27 2015 -0800
+++ b/tests/test-globalopts.t Sun Dec 13 10:35:03 2015 -0800
@@ -349,6 +349,7 @@
glossary Glossary
hgignore Syntax for Mercurial Ignore Files
hgweb Configuring hgweb
+ internals Technical implementation topics
merge-tools Merge Tools
multirevs Specifying Multiple Revisions
patterns File Name Patterns
@@ -431,6 +432,7 @@
glossary Glossary
hgignore Syntax for Mercurial Ignore Files
hgweb Configuring hgweb
+ internals Technical implementation topics
merge-tools Merge Tools
multirevs Specifying Multiple Revisions
patterns File Name Patterns
--- a/tests/test-help.t Sun Dec 13 10:45:27 2015 -0800
+++ b/tests/test-help.t Sun Dec 13 10:35:03 2015 -0800
@@ -111,6 +111,7 @@
glossary Glossary
hgignore Syntax for Mercurial Ignore Files
hgweb Configuring hgweb
+ internals Technical implementation topics
merge-tools Merge Tools
multirevs Specifying Multiple Revisions
patterns File Name Patterns
@@ -187,6 +188,7 @@
glossary Glossary
hgignore Syntax for Mercurial Ignore Files
hgweb Configuring hgweb
+ internals Technical implementation topics
merge-tools Merge Tools
multirevs Specifying Multiple Revisions
patterns File Name Patterns
@@ -773,6 +775,7 @@
glossary Glossary
hgignore Syntax for Mercurial Ignore Files
hgweb Configuring hgweb
+ internals Technical implementation topics
merge-tools Merge Tools
multirevs Specifying Multiple Revisions
patterns File Name Patterns
@@ -862,6 +865,14 @@
(use "hg help -v debug" to show built-in aliases and global options)
+internals topic renders index of available sub-topics
+
+ $ hg help internals
+ Technical implementation topics
+ """""""""""""""""""""""""""""""
+
+ bundles container for exchange of repository data
+ changegroups representation of revlog data
Test list of commands with command with no help text
@@ -1530,6 +1541,13 @@
Configuring hgweb
</td></tr>
<tr><td>
+ <a href="/help/internals">
+ internals
+ </a>
+ </td><td>
+ Technical implementation topics
+ </td></tr>
+ <tr><td>
<a href="/help/merge-tools">
merge-tools
</a>
--- a/tests/test-hgweb-json.t Sun Dec 13 10:45:27 2015 -0800
+++ b/tests/test-hgweb-json.t Sun Dec 13 10:35:03 2015 -0800
@@ -1062,6 +1062,10 @@
"topic": "hgweb"
},
{
+ "summary": "Technical implementation topics",
+ "topic": "internals"
+ },
+ {
"summary": "Merge Tools",
"topic": "merge-tools"
},