D6324: help: register the 'gpg' command category and give it a description
Sietse (Sietse Brouwer)
phabricator at mercurial-scm.org
Sun Apr 28 21:17:13 UTC 2019
Sietse created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
help.py expects extensions to register their command category in the
CATEGORY_ORDER and CATEGORY_NAMES variables. Once gendoc.py orders
commands by category, in the next patch, it'll assume this registration
(and raise an exception on encountering any unregistered categories).
Luckily, gpg is the only bundled extension with an unregistered custom
category, so let's fix it.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D6324
AFFECTED FILES
hgext/gpg.py
CHANGE DETAILS
diff --git a/hgext/gpg.py b/hgext/gpg.py
--- a/hgext/gpg.py
+++ b/hgext/gpg.py
@@ -49,6 +49,11 @@
# Custom help category
_HELP_CATEGORY = 'gpg'
+help.CATEGORY_ORDER.insert(
+ help.CATEGORY_ORDER.index(registrar.command.CATEGORY_HELP),
+ _HELP_CATEGORY
+)
+help.CATEGORY_NAMES[_HELP_CATEGORY] = 'Signing changes (GPG)'
class gpg(object):
def __init__(self, path, key=None):
To: Sietse, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list