[PATCH] help: exclude debug commands

Gilles Moris gilles.moris at free.fr
Sat Oct 17 02:31:37 CDT 2015



Le 16/10/2015 20:51, timeless a écrit :
> help: exclude debug commands
>
> diff --git a/mercurial/help.py b/mercurial/help.py
> --- a/mercurial/help.py
> +++ b/mercurial/help.py
> @@ -105,6 +105,8 @@
>               results['topics'].append((names[0], header))
>       import commands # avoid cycle
>       for cmd, entry in commands.table.iteritems():
> +        if not ui.verbose and cmd.startswith('debug'):
Or should we look at the debug flag instead to display

> +            continue
>           if len(entry) == 3:
>               summary = entry[2]
>           else:
> @@ -123,10 +125,14 @@
>           # extensions.load ignores the UI argument
>           mod = extensions.load(None, name, '')
>           name = name.split('.')[-1]
> +        if not ui.verbose and name.startswith('debug'):
> +            continue
>           if lowercontains(name) or lowercontains(docs):
>               # extension docs are already translated
>               results['extensions'].append((name, docs.splitlines()[0]))
>           for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems():
> +            if not ui.verbose and cmd.startswith('debug'):
> +                continue



More information about the Mercurial-devel mailing list