Commit Graph

8 Commits

Author SHA1 Message Date
Mike Hommey
6ee628d425 Bug 1147283 - Replace mozpack.path with mozpath. r=mshal
Back when mozpack.path was added, it was used as:

  import mozpack.path
  mozpack.path.func()

Nowadays, the common idiom is:

  import mozpack.path as mozpath
  mozpath.func()

because it's shorter.

$ git grep mozpath\\. | wc -l
423
$ git grep mozpack.path\\. | wc -l
123

This change was done with:
$ git grep -l mozpack.path\\. | xargs sed -i 's/mozpack\.path\./mozpath./g'
$ git grep -l 'import mozpack.path$' | xargs sed -i 's/import mozpack.path$/\0 as mozpath/'
$ (pat='import mozpack.path as mozpath'; git grep -l "$pat" | xargs sed -i "1,/$pat/b;/$pat/d")
2015-03-27 08:13:16 +09:00
Mike Hommey
31a9d027d6 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
Nathan Froyd
272ec74032 Bug 1062518 - ensure that |mach python-test| considers $PWD when finding tests; r=mshal 2014-09-15 13:25:41 -04:00
Nathan Froyd
610893e3cf Bug 1056862 - make |mach python-test| work even if run from outside the srcdir; r=gps
DONTBUILD because NPOTB
2014-08-21 11:03:26 -04:00
Gregory Szorc
7ed1787414 Bug 952280 - mach python commands now use virtualenv APIs; r=mshal
The Python-related mach commands were written before we had a virtualenv
API exposed to the mach command context. This patch updates those
commands to use the newer APIs. As a bonus, these commands now work
without running configure!

--HG--
extra : rebase_source : ea394d6fc0c5fa2d3a3a6ed25fc59ce6be40690c
extra : amend_source : e841d57a2578c93b778ef73c68c35a8cc7cfde44
2013-12-19 13:48:37 -08:00
Mike Hommey
56cdbfee3a Bug 905490 - Avoid "mach python" logging the python command. r=gps 2013-08-15 23:45:09 +09:00
Matt Brubeck
93e36046ad Bug 899695 - Fix exception in "mach python" on Windows [r=gps]
DONTBUILD (not part of the build)
2013-08-08 08:06:02 -07:00
Nick Alexander
1646b03224 Bug 818744 - mach commands to run Python and Python unit tests. r=gps
DONTBUILD because NPOTB
2013-07-02 17:33:48 -07:00