changeset 27387:dfab0afde928

help: filter extension commands
author timeless <timeless@mozdev.org>
date Mon, 14 Dec 2015 05:29:55 +0000
parents 55ac8006880f
children 4a921d66617f
files mercurial/help.py tests/test-help.t
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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: