[PATCH 2 of 2] help: filter extension commands

timeless timeless at mozdev.org
Mon Dec 14 00:05:13 CST 2015


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1450070995 0
#      Mon Dec 14 05:29:55 2015 +0000
# Node ID 229f8ec6ad99ae815db672c111b05922cb21c55b
# Parent  ab3fdce6469850a8815205d6f328e16ea3b3dde8
help: filter extension commands

diff --git a/mercurial/help.py b/mercurial/help.py
--- a/mercurial/help.py
+++ b/mercurial/help.py
@@ -143,6 +143,8 @@
                     cmddoc = gettext(entry[0].__doc__).splitlines()[0]
                 else:
                     cmddoc = _('(no help text available)')
+                if filtercmd(ui, cmdname, kw, cmddoc):
+                    continue
                 results['extensioncommands'].append((cmdname, cmddoc))
     return results
 
diff --git a/tests/test-help.t b/tests/test-help.t
--- a/tests/test-help.t
+++ b/tests/test-help.t
@@ -1057,7 +1057,7 @@
   Commands:
   $ hg help -e|egrep '^[A-Z].*:|^ debug'
   Extensions:
-  $ hg help -k|egrep '^[A-Z].*:'
+  $ hg help -k|egrep '^[A-Z].*:|^ debug'
   Topics:
   Commands:
   Extensions:


More information about the Mercurial-devel mailing list