Граф коммитов

179 Коммитов

Автор SHA1 Сообщение Дата
Gregory Szorc 4174483eb1 Bug 1318044 - Issue sgr0 after printing every line; r=froydnj
The sgr0 terminal capabity defines the byte sequence needed to reset
terminal text to its default state. For reasons documented inline in
this commit, we now print this sequence after every line printed by
mach's terminal logger.

MozReview-Commit-ID: 3RukP0QXtqy

--HG--
extra : rebase_source : 5e4b7d001300ec1059b53423b310ac9fdd514c72
2016-12-12 10:23:02 -08:00
Andrew Halberstadt 6adcf5b456 Bug 1317970 - Use manifestparser manifests for python unit tests, r=chmanchester
This deprecates PYTHON_UNIT_TESTS and replaces it with PYTHON_UNITTEST_MANIFESTS.
In the build system, this means python unittests will be treated the same as all
other test suites that use manifestparser. New manifests called 'python.ini' have
been created for all test directories containing python unittests.

MozReview-Commit-ID: IBHG7Thif2D

--HG--
extra : rebase_source : 11a92a2bc544d067946bbd774975140147458caa
2016-11-16 09:59:22 -05:00
Gregory Szorc cc764ee794 Bug 1315785 - Set an environment variable when mach is attached to a TTY; r=glandium
The way it works now, `mach` commands often invoke subprocesses where
the subprocesses' stdio file descriptors are pipes so the mach command
can e.g. parse output.

Processes like clang, gcc, and cargo determine if they can send color
codes to {stderr, stdout} by seeing if those file descriptors are TTYs.
When e.g. `make` is executed via `mach`, this test fails because those
descriptors are pipes (even though they eventually end up on a TTY).

We can't wire the file descriptors to the TTY because `mach` needs
to analyze output. We don't want users defining process flags to force
color in their mozconfigs because color codes would still be sent
if stdout was not a TTY.

This patch sets the MACH_STDOUT_ISATTY environment variable in all mach
commands when stdout is a TTY. Subsequent processes can then look for
this variable to determine whether to override color settings, print
terminal control codes, etc.

MozReview-Commit-ID: GxXP2mQssjC

--HG--
extra : rebase_source : 4b99547b453cb7dd5cb590a71ed554ce2bc4759d
2016-11-08 12:15:13 -08:00
Gregory Szorc 0f12e2d300 Bug 1315785 - Restore environment variables after running command; r=glandium
Currently, environment variables set when running mach commands will
propagate after the command is finished. This can allow unwanted state
to bleed through.

This likely isn't an issue today, but isolating state during code
execution is generally a good practice. So do that.

MozReview-Commit-ID: AdaomGub5EF

--HG--
extra : rebase_source : ce81987a1f6de3a16bce6a9e45b9dc8e8eb29b4b
2016-11-08 12:15:07 -08:00
Andrew Halberstadt fae591ac2b Bug 1304593 - Fix broken test_entry_point.py in mach, r=gps
Fix and enable python/mach/mach/test/test_entry_poiny.py.

MozReview-Commit-ID: FtMpt8Nmq3g

--HG--
extra : rebase_source : 73755266b7d9570065c0ab18e0b50e074559914c
2016-09-27 17:11:00 -04:00
Nathan Hakkakzadeh cf3b86a327 Bug 1100925 - Mach now detects msys2. r=gps
Before, mach would only detect MINGW32 (used with msys). Now it also detects MINGW64 (used with msys2).

MozReview-Commit-ID: 6IrNNmkLKgB

--HG--
extra : rebase_source : e84ee16b5bbc1b6b113163ba5b61759f763645c1
2016-05-31 14:44:53 -07:00
Gregory Szorc cd0ac88627 NO BUG - Bump version of mach to 0.6
DONTBUILD (NPOTB)
2016-05-02 13:36:33 -07:00
Andrew Halberstadt e34562488e Bug 1255450 - mach settings documentation fix, DONTBUILD, r=me
MozReview-Commit-ID: AQ3w2oCPQeN

--HG--
extra : topic : bar
extra : rebase_source : 2e0de1688fca11bd62c88bd66ef9cf9ad97206f8
extra : amend_source : 45c025594d645a9252989c8f13387de05e49d4dd
2016-04-12 21:03:36 -04:00
Andrew Halberstadt 683014d78f Bug 1255450 - [mach] Create setting for defining command aliases, r=gps
These config options can be defined in ~/.mozbuild/machrc or topsrcdir/machrc.
Aliases work similar to the identically named option in an hgrc.

For example:

[alias]
browser-test = mochitest -f browser
mochitest = mochitest -f plain


MozReview-Commit-ID: CnOocEslRUI

--HG--
extra : rebase_source : 2a6fa154aca7fea8f159ed840728951a37bc52ec
2016-03-23 17:34:35 -04:00
Andrew Halberstadt fbc37fe116 Bug 1255450 - [mach] Enable runtime configuration files, r=gps
Runtime configs have been implemented for awhile, but disabled. This patch
enables configuration. Config files will be loaded in the following order
(later files override earlier ones):

1a. $MACHRC
1b. $MOZBUILD_STATE_PATH/machrc (if $MACHRC is unset)
2. topsrcdir/machrc
3. CLI via --settings

Note: .machrc may be used instead of machrc if desired.

MozReview-Commit-ID: IntONAZLGML

--HG--
extra : rebase_source : ff79b129eaea7cca5064d30fa6ddc76fceb9669b
2016-03-28 11:18:24 -04:00
Andrew Halberstadt e0018e5245 Bug 1255450 - [mach] Simplify managing of locale documentation for settings, r=gps
This adds a |mach settings locale-gen| subcommand to automatically generate locale
specific documentation for settings. It also refactors |mach settings-create| to
|mach settings| and moves |mach settings| to |mach settings -l|. Finally it performs
some misc cleanup mostly related to locales.

MozReview-Commit-ID: 1VWLcb9ehAH

--HG--
extra : rebase_source : 8f580217123d79e66323ca4be948a3297ae4ced3
2016-03-23 17:49:15 -04:00
Andrew Halberstadt c105e8a3b4 Bug 1255450 - [mach] Implement 'wildcard' settings for enabling sections with user-defined options, r=gps
Some sections should support user-defined options. For example, in an [alias] section, the option names
are not well-defined, rather specified by the user. This patch allows user-defined option names for any
section that has a 'section.*' option defined. Even with 'section.*', option types are still well-defined.

MozReview-Commit-ID: L34W9v9Fy28

--HG--
extra : rebase_source : 9333f552edead9bf1cf464e28ef8fbbb9bed5597
2016-03-28 10:52:16 -04:00
Andrew Halberstadt 5167efa8e4 Bug 1255450 - [mach] Replace ConfigProvider class with config_settings attribute, r=gps
Defining settings was a little complicated. First it required overriding a '_register_settings'
method, and then it required making N calls to a second 'register_setting' method within that.

This patch simplifies the process of defining settings by only requiring a
'config_settings' attribute. This attribute should be a list of tuples:

[
  ('<section>.<option>', '<type>', <default>, set(<choices)),
]

`default` and `choices` are optional. Alternatively, 'config_settings' can be a callable
that returns a list of tuples in the same format. This still allows for greater flexibility
for more advanced cases.

MozReview-Commit-ID: F4DTTNJdJsa

--HG--
extra : rebase_source : e3dd455ba559cd3992c9c1b3eaf021c9e0707cc1
2016-03-21 17:55:41 -04:00
Andrew Halberstadt 3098112a41 Bug 1262495 - [mach] Allow running root commands that have subcommands on their own, r=gps
For example, say there is a command 'foo' that has a subcommand 'bar'. Prior to this, it was not
possible to run:
./mach foo

as its own independent command. The above would instead print the subcommand help for 'bar'.

MozReview-Commit-ID: JU4dXoxnCyu

--HG--
extra : rebase_source : bb15532ad39456b270071bc60d7b15e15af04e48
2016-04-06 11:41:13 -04:00
Steve Fink 094469068b Bug 991343 - Suppress time output when running inside emacs, r=gps
Because I Care.

MozReview-Commit-ID: 9An5QwxnBpU

--HG--
extra : amend_source : 1c9f689d8aecb41debc0a657455c3c53ec219fa1
2016-03-11 16:51:24 -08:00
Andrew Halberstadt 7a0cb68d63 Bug 1255470 - [mach] don't raise if a subcommand exists and but wasn't found in args, r=gps
This is currently preventing a command from having both args and subcommands at the same
time.

MozReview-Commit-ID: 66frAqamGjv

--HG--
extra : rebase_source : 3bbd1cb508e5aab7ba7f9936c0c486ed8f626fe9
2016-03-10 11:51:43 -05:00
Andrew Halberstadt 67699efe5c Bug 1255467 - Ability for a mach command to dispatch to another's subcommand, r=gps
MozReview-Commit-ID: CN8kJU0NrL0

--HG--
extra : rebase_source : 673041aaeaa48cb32c68955e0448737e1ebbc459
2016-03-10 11:45:39 -05:00
Dan Minor f3c1aea318 Bug 1239296 - add post_dispatch_handler hook to mach r=gps
This adds a post_dispatch_handler hook that will be called after each
mach invocation and uses it to submit data to telemetry.

--HG--
extra : rebase_source : 1dedea568b7ccec17fa58eb1841425b165d8a644
2016-02-09 10:09:17 -05:00
Robert Longson 5e6d529757 Bug 1240616 - mach mochitest-run suggests deprecated commands as an alternative r=cmanchester 2016-01-19 21:39:16 +00:00
Gijs Kruitbosch 4f7d946d9f Bug 1236111 - part 0: improve logging from process mixin, r=gps
--HG--
extra : commitid : 8fODk4pYcos
extra : rebase_source : c80e8dc7ce278a98ee27d72fdfe998cbc14a00fb
2016-01-05 11:13:05 +00:00
Xidorn Quan c13216ec53 Bug 1205144 - Remove 'REMOVED' commands from output of mach-commands and mach-debug-commands. r=gps DONTBUILD
--HG--
extra : source : 7d40827d58f699b57668ad80573e93b3b0a8d0b0
extra : amend_source : 98c5b7adbd1a330528d70a8f41096cd26fe49bdd
2015-09-21 11:32:03 +10:00
James Graham 399b0b18f5 Bug 1192315 - Support remainder arguments from predefined parsers in mach, r=gps
Mach has special handling for remainder arguments which previously
only worked with the decoration form. Extend this to also work when
a command passes in an explict parser

--HG--
extra : commitid : ICnYk764Xbc
extra : rebase_source : 1518edcb7bef375cbc2931b8da54b015045c8ce1
2015-08-07 18:13:05 +01:00
Supradeep T R 8d41cd6385 Bug 1184780 - Use command help instead of main help; r=gps
--HG--
extra : commitid : MLpRMrje13
extra : amend_source : ff2038edce79b1b610be52e2908681d6de5edda2
2015-07-17 13:42:12 -07:00
Gregory Szorc 4121a5645c Bug 1182677 - Support calling a function during mach command dispatch; r=smacleod
This will give us the ability to execute custom code at command dispatch
time. We can use this for global tests before dispatch.

--HG--
extra : commitid : 5vfmSqOis4W
extra : rebase_source : c285b16007c4b604b164d079a275198c8760e480
2015-07-14 13:46:33 -07:00
Supradeep T R 5b30ad463d Bug 1175968 - Honor '-h' or '--help' only if it appears before '--'; r=gps
--HG--
extra : commitid : DQ1fwp6yyLQ
extra : amend_source : 9f556fa52c94be417d46ac57930520248b7b715d
2015-07-13 16:58:54 -07:00
Ehsan Akhgari c1484ba42b Bug 1179488 - Accept any arguments passed to deprecated commands; r=gps
Without this, we throw UnrecognizedArgumentError when running commands
such as `./mach mochitest-plain test`, which causes an error message
such as the below to be emitted:

It looks like you passed an unrecognized argument into mach.

The mochitest-plain command does not accept the arguments: test

This patch will fix the above command to instead print the corresponding
deprecation message.
2015-07-06 18:08:48 -04:00
Andrew Halberstadt f8bb1d3236 Bug 1177476 - Fix require_conditions regression in mach, r=gps
This is a regression from bug 1176620 that results in all Firefox mach commands showing up in the help for B2G, even though they don't work there.

--HG--
extra : rebase_source : e779b866a82c2df1dbf913d24b93a0dc9838ff9f
2015-06-25 15:44:11 -04:00
Gregory Szorc 2d3964ecf9 Bug 1176620 - Eliminate MethodHandler; r=ahal
This type is now redundant with our new rich type for capturing all mach
command metadata. Eliminate it and using _MachCommand instead.

--HG--
extra : commitid : 7pXhf6V7F8m
extra : rebase_source : 343615096f23d3acf23f7487c7b8c7137c85337e
2015-06-21 13:17:51 -07:00
Gregory Szorc 89a96642e2 Bug 1176620 - Pass fewer arguments into MethodHandler; r=ahal
Simplify construction of mach's MethodHandler instances by by passing in
our new rich type that holds all command metadata.

While we are here, kill the docstring argument, as it can be computed
easily inside MethodHandler.__init__.

--HG--
extra : commitid : I5PRlYDVXVq
extra : rebase_source : ebf07116357036ddfec06fd32fb161fefff628e6
2015-06-21 13:07:33 -07:00
Gregory Szorc 3e834385c6 Bug 1176620 - Refactor how mach command metadata is stored; r=ahal
Up to this point, mach command metadata has been stored in tuples.
Initially, things weren't so bad. But they have evolved into tuples with
many elements. Adding new attributes is cumbersome. Let's restructure
the code to capture metadata in a dedicated class.

Before, there existed a separate attribute on the @Command or
@SubCommand decorated method for each mach decorator: @Command,
@CommandArgument, @CommandArgumentGroup. With the magic of __ior__,
we can now capture all metadata on a single type. This simplies
processing, as we now only look at a single attribute on methods:
_mach_command.

Before, we used separate attributes to distinguish between mach commands
and mach sub-commands. Now that we have a type that can hold all data,
we combine things into the _mach_command attribute and look for the
presence of the "subcommand" attribute on this type to identify
sub-commands.

--HG--
extra : commitid : EtBwUmS5TV2
extra : rebase_source : 4ef5f95a532693672c6c4b33fa1c22adb76d105e
2015-06-21 12:59:29 -07:00
Gregory Szorc 95643136a3 Bug 1176620 - Use absolute_import in mach; r=ahal
To help ensure Python 3 compatibility.

--HG--
extra : commitid : 1eCMr8OKGRa
extra : rebase_source : 49a6037ae6a25a5d3e30b93b634f3b4cc1b55a4e
2015-06-21 11:56:05 -07:00
Gregory Szorc 67e6a15a08 Bug 1173633 - Print docstrings of mach command handlers in help output; r=ahal
`mach help <command>` currently only displays a brief description of the
command along with its arguments. Sometimes more detailed help text is
needed.

With this commit, the docstrings of mach command handlers will appear in
the output of `mach help <command>` if they are defined.

I've implemented basic docstrings for the three flavors of mach commands
(normal command, main subcommand, subcommand) to demonstate things work.

My hope is others will start to fill in docstrings once this feature
lands so the output for `mach help` can serve as a better learning guide
for new contributors.

--HG--
extra : commitid : Hx6ZkHDxbCK
extra : rebase_source : 01ced5a044442e370a45cd3fb245ac6283316925
extra : amend_source : fceb771e0e1ffa4e6f3f1b7c22eae6e25cf82034
2015-06-11 08:32:02 -07:00
Andrew Halberstadt 7aa80fb529 Bug 1164597 - Consolidate all mochitest mach commands into single |mach mochitest|, r=chmanchester
--HG--
extra : rebase_source : 0a0d8a454df10ae9df9678c98e11b5eaf8249f51
2015-05-05 16:41:59 -04:00
Andrew Halberstadt 77b43440dc Bug 1163112 - [mach core] Consolidate functionality between Main._run and Registrar.dispatch, r=gps
--HG--
extra : rebase_source : 37fb8698c388b63b212c4b02b387dd8814eeecde
2015-05-08 17:03:15 -04:00
Andrew Halberstadt 063752e915 Bug 1154006 - [mach] Ability to lazy load parsers passed in via the @Command decorator, r=gps
--HG--
extra : rebase_source : d596a8c1c5a947de18c8c6bfe1e7642074871fcb
2015-04-13 15:36:56 -04:00
Andrew Halberstadt 0594572840 Bug 1140441 - Add substring matching option to |mach mach-debug-commands|, r=gps
--HG--
extra : rebase_source : 266cfc67fdfbed559619a07dabc8a8d14fafa232
2015-03-06 11:25:55 -05:00
Gregory Szorc db67b0d1f3 Bug 1139100 - Apply proper checking for command existence; r=ahal
Previously, we raised errors attempting to register a mach sub-command
if the parent command was not defined on the Registrar. This broke B2G
because its mach command Registrar imposes restrictions on which
commands it exposes. Commands there were not getting registered on the
Registrar, leading mach to give a false positive that the parent command
was never defined.

We change the verification logic to take present but unregistered
commands into consideration and to skip registering sub-commands if the
parent isn't present in the Registrar.

--HG--
extra : rebase_source : 150eea0ca85d9f2c9cd9e98f5bf905695da53bf4
2015-03-04 11:03:07 -08:00
Gregory Szorc 3d2bba6b22 Bug 1129798 - Use pdb.runcall to debug mach commands; r=ahal
The previous debugger was setting a breakpoint in the mach dispatcher.
This required users to step into the main function to be called into.
Using pdb.runcall(), the debugger starts at the first line in the
executed command, which is far more useful.

--HG--
extra : rebase_source : 10734805ad40ec85eedbb089b11d618dc32398e7
extra : amend_source : da89da1af1f137db2f5902bcb5a69312f4636a4b
2015-02-04 22:49:06 -08:00
Gregory Szorc 72383f27e2 Bug 1115278 - Fix mach documentation issues; r=glandium
terminal.py had an ambiguous |import logging| that was importing
mach.logging from Sphinx. We fix it.

There was also a poorly formed link in the mach commands documentation.
We fix it.

--HG--
extra : rebase_source : 12783c69027989ac031d29e4ecbc1ee2f465ffa4
extra : histedit_source : 4283c6cdecc4de8aa7636d0c4cc566daf5142b50
2014-12-24 10:26:34 -08:00
Gregory Szorc d4167639f5 Bug 1108399 - Implement mach sub-command dispatching; r=ahal
--HG--
extra : rebase_source : f81c4c55db4b262e6c3f52d638f66b75d2d5d4e2
extra : source : 7d2f0a5d2829a7f44b2f7e97be93520ce13991f0
extra : histedit_source : 7d8e10a990cd19e3d2f5672b4d4da1bfae214f40
2014-12-06 22:33:12 -08:00
Gregory Szorc 16347a2b0d Bug 1108399 - Handle help on mach sub-commands; r=ahal
--HG--
extra : rebase_source : b0a0ce3f5f6bf31ee3e0cd7d7cfd3be0fa9db598
extra : histedit_source : 2aee6a7bba61ce8074df1ed5edcd7fc2d27c5bf8
2014-12-06 22:39:32 -08:00
Gregory Szorc df110b64e1 Bug 1108399 - Split command group populating into own function; r=ahal
An upcoming patch will reuse this code. Split it out into its own
function.

--HG--
extra : rebase_source : 2057266a1ed4d86b1ca857712cd279bdfbd32148
extra : histedit_source : 8f2b7ec06e5b72ab08586902c51c3025a53259e6
2014-12-07 11:56:31 -08:00
Gregory Szorc 803634a62d Bug 1108399 - Introduce decorator for mach sub-commands; r=ahal
With this patch, we now have the ability to declare mach sub-commands.
Subsequent patches will implement dispatching for sub-commands.

--HG--
extra : rebase_source : 32a672ff3ba7a1a1c8c27dff3fe657dec08e3569
extra : histedit_source : 2bb2c27ae0e2dab052a6ef93b0a70f488f8cd56e
2014-12-07 11:40:39 -08:00
Gregory Szorc 04824e5fc7 Bug 1108399 - Properly name command help function; r=ahal
We will soon have proper sub-commands. Let's fix function names.

--HG--
extra : rebase_source : 1cb0c008ecc0d2159dd799e76adad4892d65f119
extra : histedit_source : 9472b2d2609224b011eca04385cf9d5a49986864
2014-12-06 21:58:46 -08:00
Gregory Szorc fed897ef4e Bug 1108399 - Remove outdated comment about hooking up conditional commands; r=ahal
mach conditions are implemented elsewhere. This comment can die.

--HG--
extra : rebase_source : c956d5af7858d997a1f49f3b24bb54e5f8a52240
extra : histedit_source : 76b8155b12ab0ea86e16e807b1c6f691cb8f3640
2014-12-06 21:53:16 -08:00
Gregory Szorc 32794223fa Bug 1108399 - Fix docs for mach decorators; r=ahal
Documentation was referencing sub commands. The proper terminology is
"command."

--HG--
extra : rebase_source : aa2fc73c6141850109324fd5299491e49ef29e91
extra : histedit_source : da075bea5a36a9de81527d93a9fc751cd6cae9b2
2014-12-06 21:15:27 -08:00
Gregory Szorc cd12686186 Bug 1108399 - Properly link to Python docs; r=ahal
There were a few parts of the docs that were linking to Python types
incorrectly. Let's fix that.

--HG--
extra : rebase_source : 374be660084727eba1ce9181c2abf384f40eeb82
extra : histedit_source : bfa8de9b7a277666d92ebe71cd64ffed96628518
2014-12-07 11:37:54 -08:00
Gregory Szorc e6f5b57c9e Bug 1108399 - Split mach documentation into multiple articles; r=ahal
The main mach docs page is a bit long. Let's split it into multiple
articles to increase readability going forward.

--HG--
rename : python/mach/docs/index.rst => python/mach/docs/commands.rst
rename : python/mach/docs/index.rst => python/mach/docs/driver.rst
rename : python/mach/docs/index.rst => python/mach/docs/logging.rst
extra : rebase_source : 484d60327568333fcb0069e1f3444dc6db4322c0
extra : histedit_source : 18d09ac2e2e93565661763b6567f7a46226735f5
2014-12-07 11:34:06 -08:00
Gregory Szorc f19342d346 Bug 1108399 - Improve code linking in mach docs; r=ahal
Now that mach's docs are part of a proper Sphinx install, link to
Python type docs. While we're here, we also clean up formatting of code
samples.

--HG--
extra : rebase_source : 974337316dc87c04aca79a9e4a0d464490e5cdd4
extra : histedit_source : db87e8e5cb7c9c1969fd89e58c39623862684a6a
2014-12-07 11:23:46 -08:00
Gregory Szorc c296a9c285 Bug 1108399 - Move mach docs into sphinx; r=ahal
mach has restructured text documentation. Let's expose it to the in-tree
Sphinx config so we can increase visibility of the documentation.

--HG--
rename : python/mach/README.rst => python/mach/docs/index.rst
extra : rebase_source : 68a08bebaa5b99ca39e250fa1ed60ca4d7d0af68
extra : histedit_source : 6afda2fece486547192c1c8eba97a2474e3d99c1
2014-12-07 10:40:19 -08:00
Gregory Szorc 6bcfb690b5 Bug 1107968 - Add --debug-command to mach; r=ahal
People often seek to learn how mach commands work. A common way to do
this is to launch a debugger and step through the code as it is
executing. But this requires someone to first find and modify the mach
command. This involves overhead.

This patch adds a global --debug-command argument to mach. When present,
we launch an interactive debugger right before command dispatch. This
allows people to easily enter a debugger to see what mach commands are
doing, hopefully lowering the barrier to understanding and contributing.

--HG--
extra : rebase_source : 5ebfa7f5fd89f96dac5f7cb035ab520c63b32e55
extra : amend_source : c53c988763c328020b49aa5c6245df685b6f30bc
2014-12-05 10:19:49 -08:00
Nicholas Nethercote ad552dd048 Bug 1077272 - Allow argument groups in mach commands. r=gps.
--HG--
extra : rebase_source : 478b305eedac6d30af748d80da408042aba48c14
2014-10-08 15:11:50 -07:00
Mike Hommey 417a2977b3 Bug 1076649 - Remove the '+' prefixing from mach commands with allow_all_arguments=True. r=gps
The reason to use '+' prefixing was to distinguish between options to the
mach command itself, and options that are passed down to whatever the
command does (like mach run passing down args to the built application).
That makes things unnecessarily awkward, and quite non-standard.

Instead, use standard '-' prefixing, and pass all the unknown arguments
down. If there is overlap between the known arguments and arguments supported
by the underlying tool (like -remote when using mach run), it is possible to
use '--' to mark all following arguments as being targetted at the underlying
tool.

For instance:
    mach run -- -remote something
would run
    firefox -remote something
while
    mach run -remote something
would run
    firefox something

As allow_all_arguments is redundant with the presence of a argparse.REMAINDER
CommandArgument, allow_all_arguments is removed. The only mach command with a
argparse.REMAINDER CommandArgument without allow_all_arguments was "mach dmd",
and it did so because it didn't want to use '+' prefixes.
2014-10-07 07:36:27 +09:00
Ahmed Kachkach 85ea4a47c6 Bug 1057694 - Command suggestions in mach. r=gps 2014-08-26 16:17:00 +02:00
Sylvestre Ledru 06c5b7516f Bug 1051987 - Remove useless option which wasn't supposed to go in the commit
--HG--
extra : amend_source : 83ccc90a5ee1b0a41640d2b1451208add8dc2c5d
2014-08-18 15:33:51 +02:00
Sylvestre Ledru d257c5c025 Bug 1051987 - By default, hide the disabled commands. They are eating the display for no value. $ ./mach -v help bring them back. r=jmaher
From 7c2de97792113d3415acf2cfa1591fa05c5b07a8 Mon Sep 17 00:00:00 2001
 display for no value. $ ./mach -v help bring them back.
---
 build/mach_bootstrap.py        |  2 +-
 python/mach/mach/dispatcher.py | 14 +++++++-------
 python/mach/mach/main.py       |  3 +++
 3 files changed, 11 insertions(+), 8 deletions(-)
2014-08-11 18:31:24 +02:00
Gregory Szorc 804eecce0c Bug 1043524 - Define group variable is an existing parser is passed; r=jgraham
While I was here, I removed the try..except in favor of failing fast.
Before, we were only making cosmetic changes. Now, we actually need the
group for mach to work. It makes sense to stop ignoring errors.

This fixes a regression from d53d1c6cdf13 / bug 951733.

--HG--
extra : rebase_source : aeb6c99a945eaff32cf86fa481d03c0c8dee593a
extra : amend_source : f1e29385bf8ca8ac250a04f81e7e955c4152b476
2014-07-24 11:35:15 -07:00
Mike Hommey 4474b717c2 Bug 1030717 - Don't try to create the mach state directory until it's actually needed. r=gps 2014-07-03 07:15:31 +09:00
Jason Orendorff 191268a9b5 Bug 1020514 - Make mach colorize lines that start with REFTEST TEST-UNEXPECTED-FAIL etc. r=gps.
--HG--
extra : rebase_source : 30d85f6d46894753d925c4189b598de034014fe6
2014-06-20 12:01:03 -05:00
Markus Stange 8ea75a0b24 Bug 1019944 - mach logging shouldn't eat whitespace at the start of the line. r=gps 2014-06-25 10:35:32 +02:00
Mike Hommey c68c0acedb Bug 996823 - Let mach pass-through subprocesses handle Ctrl-C themselves. r=mshal 2014-05-23 07:22:51 +09:00
Ting-Yu Lin 71e1eceed8 Bug 995847 - Add -h and --help support to mach. r=glandium
* |mach --help| prints the global help message as |mach help|.
* |mach command --help| prints the command help message as
  |mach help command|.
2014-05-06 19:10:00 +02:00
Gregory Szorc 696d8e1c29 Bug 909522 - Run mach's unit tests as part of make check; r=mshal
test_entry_point.py is not enabled because the test fails. This is
tracked by bug 958196.

--HG--
extra : rebase_source : 1f326a9bbd7ee0e8e12ff33f49d8484cc244c42d
2014-01-09 11:20:41 -08:00
Gregory Szorc 62c47d4190 Bug 957856 - Synchronize mach with upstream repository; r=ahal
The test changes and setup.py are NPOTB. base.py and main.py
added a new feature to declare global arguments.

--HG--
extra : rebase_source : 4b14487d9aff98247464e0b0c08b4fc5cfbd862a
2014-01-08 16:14:39 -08:00
Gregory Szorc c5265350aa NO BUG - Synchronize mach documentation with upstream repo
DONTBUILD (NPOTB)

--HG--
extra : rebase_source : 07831414dcc182b57a6d7844f8eb2e136f1b636d
extra : amend_source : b8bc9cd1146f82d3e36bbd2846442d13989eefe4
2014-01-08 15:29:43 -08:00
James Graham f7a080f278 Bug 951733 - Support passing an existing argparse.ArgumentParser to mach in order to populate the command arguments. r=gps 2014-01-03 11:32:53 +00:00
Martin Thomson 7bd44eecd2 Bug 950957 - Use ${COMP_WORDS[0]} for completion in mach. r=gps 2013-12-19 11:42:19 -05:00
Andrew Halberstadt 63c53ee123 Bug 942275 - Add support for setuptools' entry points to mach, r=gps
* * *
Bug 942275 - Ignore load_from_entry_point if setuptools not present, r=gps
2013-12-06 09:24:09 -05:00
Ryan VanderMeulen 4fb543fa21 Backed out changeset 5cb5fdb72e55 (bug 942275) for mach bustage.
CLOSED TREE DONTBUILD
2013-12-03 11:13:26 -05:00
Andrew Halberstadt d51a9f0774 Bug 942275 - Add support for setuptools' entry points to mach, r=gps 2013-12-03 10:37:20 -05:00
Andrew Halberstadt 9eaa56c6c4 Bug 926607 - Make sure disabled category exists before dumping commands in it, r=jgriffin, DONTBUILD, a=NPOTB 2013-10-15 14:25:43 -04:00
Gregory Szorc 4d80a8348f Bug 924977 - More proper current working directory handling in mach; r=ahal 2013-10-11 12:44:15 -07:00
Sebastiaan de Haan 2612cf4654 Bug 908868 - Add code to the 'mach help' command to show disabled commands. r=gps 2013-10-11 13:41:25 -04:00
Gregory Szorc fd57d81de1 Bug 923039 - Normalize unicode environment variables to bytes; r=mbrubeck 2013-10-02 18:40:06 +02:00
Drew Willcoxon 22aea86aa7 Bug 920299 - Make Mach logger colorize TEST-START and TEST-INFO. r=gps 2013-09-26 11:04:46 -07:00
Gregory Szorc 6387b17cf3 Bug 847175 - mach mode to not prefix lines with times; r=ted
DONTBUILD (NPOTB)
2013-09-20 09:27:19 -07:00
Gregory Szorc 12d575f3db Bug 912231 - Allow mach commands to easily dispatch to other mach commands; r=jhammel
DONTBUILD (NPOTB)
2013-09-05 15:41:45 -07:00
Andrew Halberstadt 65d6003c28 Bug 901972 - Add ability to filter mach commands at runtime, r=gps 2013-08-26 17:33:10 -04:00
Andrew Halberstadt 02163ee09b Bug 902002 - Don't display mach categories in help if no commands exist under them, r=gps, DONTBUILD, a=NPOTB 2013-08-07 15:17:08 -04:00
Gregory Szorc 58177c47ea Bug 894197 - Define state directory in mach context object; r=jhammel
DONTBUILD (NPOTB)
2013-07-15 19:56:15 -07:00
Gregory Szorc 9b2727baba Bug 879406 - Unbust |mach help| when arguments are not prefixed with '-'; r=ted
DONTBUILD (NPOTB)
2013-06-14 09:44:33 -07:00
Gregory Szorc 8bced55b3b Bug 878089 - mach shouldn't fail if terminal couldn't be configured; r=ted
DONTBUILD (NPOTB)
2013-06-10 16:16:25 -07:00
Ehsan Akhgari 36eed3e6db Bug 878859 - Remove the mach clippy avatar; r=ted
DONTBUILD since this is not part of the build!
2013-06-03 15:46:23 -04:00
Gregory Szorc 2a834196e7 Bug 874471 - Handle mach command help more robustly; r=ted
DONTBUILD (NPOTB) on a CLOSED TREE
2013-05-21 15:37:06 -07:00
Matt Brubeck 1f808bd8c9 Bug 799680 - Add a bash completion script for mach [r=gps]
DONTBUILD (not part of the build)
2013-05-15 17:00:01 -07:00
Matt Brubeck 256d6a4bf4 Bug 872807 - Make mach command names case-insensitive [r=gps]
DONTBUILD (not part of the build)
2013-05-15 16:58:11 -07:00
Ms2ger 30e5ae9b11 No bug - Fix mach's highlighting of 'TEST-UNEXPECTED-FAIL'; oy-r=gps 2013-05-10 09:13:32 +02:00
Gregory Szorc 298c09657e Bug 856392 - Categorize mach commands; r=jhammel
DONTBUILD (NPOTB)
2013-05-08 17:56:30 -07:00
Gregory Szorc 3e0e163c34 Bug 857984 - mach mochitest now colorizes and prints failure summary; r=Ms2ger 2013-04-04 15:17:23 -07:00
Ms2ger 124aabc9f4 Backout changeset e1bddda508fe for double logging when running mochitests through mach. 2013-04-07 10:11:11 +02:00
Gregory Szorc 5d06e0201d Bug 857984 - mach mochitest now colorizes and prints failure summary; r=Ms2ger
--HG--
extra : rebase_source : 97900c2bf0aaa83a3a9fa5e4dc88901140f66e60
2013-04-04 15:17:23 -07:00
Matt Brubeck d6d05c27d4 Bug 841445 - Make 'mach help <command>' call print_help directly [r=gps]
DONTBUILD (not part of the build)
2013-03-26 11:15:08 -07:00
Daniel Holbert 5bce0161ab Bug 854058: Fix typo in mach error message: s/occured/occurred/. r=gps DONTBUILD 2013-03-22 22:02:37 -07:00
Matt Brubeck fb6866e656 Bug 853225 - Fix the mach usage line for subcommands [r=gps]
DONTBUILD (not part of the build)
2013-03-20 17:53:34 -07:00
Gregory Szorc f757ba542c Bug 846409 - Add |mach mach-debug-commands|; r=jhammel
DONTBUILD (NPOTB)
2013-03-04 10:18:48 -08:00
Gregory Szorc 1ea7cbf0a3 Bug 818777 - Switch to NamedTemporaryFile from mozfile; r=ted
This version works with Windows.
2012-12-20 16:11:35 -08:00
Gregory Szorc b90f244f8b Bug 818649 - Ensure mach logs are written to log file; r=jhammel
DONTBUILD (NPOTB)
2012-12-07 11:44:11 -08:00
Gregory Szorc 76c6d0c01e Bug 818366 - Ability to pass through file descriptors to child processes; r=jhammel 2012-12-05 14:22:58 -08:00
Gregory Szorc 047d37efb9 Bug 810742 - Handle callee thrown exceptions when invoking a mach command; r=jhammel 2012-12-05 14:21:58 -08:00
Gregory Szorc 5a8419ee85 Bug 818628 - Handle long exit code values; r=edmorley
DONTBUILD (NPOTB)
2012-12-05 12:32:09 -08:00