[PATCH] help: exclude debug commands
timeless
timeless at gmail.com
Sun Oct 18 09:43:26 CDT 2015
The debug flag turns on verbose, I don't really care which we use. If
someone has a preference, they can change in flight.
I should probably factor the filtering into a function...
On Oct 17, 2015 3:32 AM, "Gilles Moris" <gilles.moris at free.fr> wrote:
>
>
> 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
>>
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20151018/3169dc61/attachment.html>
More information about the Mercurial-devel
mailing list