Closed
Bug 1051987
Opened 11 years ago
Closed 11 years ago
Hide the disabled commands in mach by default
Categories
(Testing :: General, defect)
Testing
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Sylvestre, Assigned: Sylvestre)
Details
Attachments
(1 file, 1 obsolete file)
|
4.01 KB,
patch
|
jmaher
:
review+
gps
:
feedback+
|
Details | Diff | Splinter Review |
By default, hide the disabled commands.
They are eating the display for no value to the developer. Especially at the end of the display...
What really matter are the available commands.
$ ./mach -v help
bring them back.
Attachment #8470920 -
Flags: review?(jmaher)
| Assignee | ||
Comment 1•11 years ago
|
||
With the correct patch.
Attachment #8470920 -
Attachment is obsolete: true
Attachment #8470920 -
Flags: review?(jmaher)
Attachment #8470922 -
Flags: review?(jmaher)
Comment 2•11 years ago
|
||
Comment on attachment 8470922 [details] [diff] [review]
0001-By-default-hide-the-disabled-commands.patch
Review of attachment 8470922 [details] [diff] [review]:
-----------------------------------------------------------------
I approve of this.
Does |mach help| print the "The disabled commands are hidden by default. Use -v to display them." message with this patch? If not, that could lead to confusion. I'd really like a notice at the bottom of |mach help| stating the existence of disabled commands and how to access info on them.
::: python/mach/mach/dispatcher.py
@@ +196,4 @@
> if disabled_commands and 'disabled' in r.categories:
> title, description, _priority = r.categories['disabled']
> group = parser.add_argument_group(title, description)
> + if verbose == True:
|if foo == True| is almost always a bad idea. Just use |if foo|.
Attachment #8470922 -
Flags: feedback+
| Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Gregory Szorc [:gps] from comment #2)
> Does |mach help| print the "The disabled commands are hidden by default. Use
> -v to display them." message with this patch? If not, that could lead to
> confusion. I'd really like a notice at the bottom of |mach help| stating the
> existence of disabled commands and how to access info on them.
Yes, it does.
Without "-v", the result is:
[...]
webidl-example Generate example files for a WebIDL interface.
Disabled:
The disabled commands are hidden by default. Use -v to display them. These
commands are unavailable for your current context, run "mach <command>" to
see why.
> ::: python/mach/mach/dispatcher.py
> @@ +196,4 @@
> > if disabled_commands and 'disabled' in r.categories:
> > title, description, _priority = r.categories['disabled']
> > group = parser.add_argument_group(title, description)
> > + if verbose == True:
>
> |if foo == True| is almost always a bad idea. Just use |if foo|.
Right. Thanks.
Comment 4•11 years ago
|
||
Comment on attachment 8470922 [details] [diff] [review]
0001-By-default-hide-the-disabled-commands.patch
Review of attachment 8470922 [details] [diff] [review]:
-----------------------------------------------------------------
great stuff here.
Attachment #8470922 -
Flags: review?(jmaher) → review+
| Assignee | ||
Comment 5•11 years ago
|
||
here it is:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4ed3ec8f1787
but I wrongly committed some wrong code which I removed here:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8fa6ace05e73
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → sledru
| Assignee | ||
Comment 6•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•