help: filter extension commands
authortimeless <timeless@mozdev.org>
Mon, 14 Dec 2015 05:29:55 +0000
changeset 27387 dfab0afde928
parent 27386 55ac8006880f
child 27388 4a921d66617f
help: filter extension commands
mercurial/help.py
tests/test-help.t
--- a/mercurial/help.py	Mon Dec 14 06:00:32 2015 +0000
+++ b/mercurial/help.py	Mon Dec 14 05:29:55 2015 +0000
@@ -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
 
--- a/tests/test-help.t	Mon Dec 14 06:00:32 2015 +0000
+++ b/tests/test-help.t	Mon Dec 14 05:29:55 2015 +0000
@@ -1213,7 +1213,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: