--- a/mercurial/registrar.py Sun Oct 14 13:35:47 2018 +0200
+++ b/mercurial/registrar.py Sat Oct 13 05:03:50 2018 -0700
@@ -146,6 +146,10 @@
to prevent the command from running if the requested intent could not be
fulfilled.
+ If `helpcategory` is set (usually to one of the constants in the help
+ module), the command will be displayed under that category in the help's
+ list of commands.
+
The following intents are defined:
readonly
@@ -164,14 +168,17 @@
descriptions and examples.
"""
+ # Command categories for grouping them in help output.
+ CATEGORY_NONE = 'none'
+
def _doregister(self, func, name, options=(), synopsis=None,
norepo=False, optionalrepo=False, inferrepo=False,
- intents=None):
-
+ intents=None, helpcategory=None):
func.norepo = norepo
func.optionalrepo = optionalrepo
func.inferrepo = inferrepo
func.intents = intents or set()
+ func.helpcategory = helpcategory
if synopsis:
self._table[name] = func, list(options), synopsis
else: