Commit Graph

61 Commits

Author SHA1 Message Date
Tom Ritter
ccfd5ba960 Bug 1455378 Give an informative error message of you try to ./mach pastebin too large a file. r=gps 2018-04-19 17:31:00 +00:00
Andi-Bogdan Postelnicu
208087c28c Bug 1405554 - Merge clang-format with clang-tidy under the same package from toolchains. r=gps
MozReview-Commit-ID: 1XokTUVmVPL
2018-02-09 09:01:17 +02:00
Margareta Eliza Balazs
525064b391 Backed out changeset 773a25b97a66 (bug 1405554) for f8 lint failure in /builds/worker/checkouts/gecko/tools/mach_commands.py on a CLOSED TREE 2018-02-08 19:36:21 +02:00
Andi-Bogdan Postelnicu
978c3dd258 Bug 1405554 - Merge clang-format with clang-tidy under the same package from toolchains. r=gps
MozReview-Commit-ID: 1XokTUVmVPL
2018-01-31 11:02:23 +02:00
hrdktg
8695deee58 Bug 1419986 - Fix ./mach clang-format when run without path argument. r=sylvestre
MozReview-Commit-ID: EdYpYzFHXeM
2017-11-22 13:06:14 +05:30
hrdktg
4a070d69b3 Bug 1413612 - Allow running ./mach clang-format outside of topsrcdir. r=sylvestre
MozReview-Commit-ID: G6F6cFZab3d
2017-11-21 18:22:11 +05:30
Sylvestre Ledru
59e8fb4068 Bug 1411004 - ./mach clang-format: Better handling of relative paths r=mystor=mystor
For example, this is addressing the issue:
./mach clang-format -p ./mfbt/

MozReview-Commit-ID: Le8mPTOEfA7
2017-10-30 18:36:28 +01:00
Sebastian Hengst
d3b8754794 Backed out changeset 31f259ee387b (bug 1411004) for failing flake8 at tools/mach_commands.py:307:14 | indentation is not a multiple of four. r=backout 2017-10-31 16:20:11 +01:00
Sylvestre Ledru
05a64e1166 Bug 1411004 - ./mach clang-format: Better handling of relative paths r=mystor=mystor
For example, this is addressing the issue:
./mach clang-format -p ./mfbt/

MozReview-Commit-ID: Le8mPTOEfA7
2017-10-30 18:36:28 +01:00
Sylvestre Ledru
095d3bebfb Bug 1410938 - Make mach_commands.py flake8/pep8 compatible and add it the list of flake8 files r=gps
MozReview-Commit-ID: HKWsDehR0vZ
2017-10-23 18:40:22 +02:00
Sylvestre Ledru
3c7895a134 Bug 1410938 - Split the clang-format calls into batches of 200 files r=gps
MozReview-Commit-ID: 3cH295RBcv3
2017-10-23 18:14:32 +02:00
Sylvestre Ledru
2d14f68611 Bug 1397457 - Update mach to download clang-format 5.0 - Remove the deprecated comment r=trivial DONTBUILD 2017-09-11 10:07:50 +02:00
Sylvestre Ledru
17db76ad2a Bug 1397457 - Update mach to download clang-format 5.0 r=andi
MozReview-Commit-ID: EF3thvpxg6G
2017-09-06 23:56:34 +02:00
Xavier ALT
ff5d0115a2 Bug 1392012 - ./clang-format with git should exclude files from .clang-format-ignore r=sylvestre
MozReview-Commit-ID: KsgPnN9aDTC
2017-08-24 23:41:44 +02:00
Xavier ALT
8618f23509 Bug 1389956 - extract clang format diff command generation into its own method r=sylvestre
MozReview-Commit-ID: 8kbZcfMBe4J
2017-08-23 00:24:23 +02:00
Rok Garbas
9d7ac6a8ed Bug 1284475 - migrate ToolTool blueprint to new codebase of relengapi r=KWierso
UPGRADE_NSS_RELEASE a=kaie
MozReview-Commit-ID: 7CB1VYb8OJP
2017-08-08 10:55:52 +02:00
Gregory Szorc
985dd8628c Bug 1392886 - Expose repository type as an instance property; r=mshal
This will remove the need to sniff class types. The 1 in-tree
consumer doing this has been converted.

MozReview-Commit-ID: I8cUa8J54VE
2017-08-22 20:04:55 -07:00
Sylvestre Ledru
ee3a5942f3 Bug 1391231 - Use the list provided by .clang-format-ignore instead of only thirdpartypath.txt r=gps
MozReview-Commit-ID: CY1fS7Fg1y
2017-08-17 15:22:06 +02:00
Xavier ALT
f935efe2bc Bug 1387035 - Update clang-format methods to use mozversioncontrol for hg/git detection r=gps
MozReview-Commit-ID: IZTPYtTxuKu
2017-08-15 23:23:30 +02:00
Prithviraj Pawar
44637d5128 Bug 1387036 : ./mach clang-format , removed filterdiff and added "git diff -- *" for restricting diff to a given set of file extensions. r=sylvestre
MozReview-Commit-ID: 3M7GMpFYqkR
2017-08-12 23:35:51 +05:30
Sylvestre Ledru
9b10fa8cec Bug 1376803 - add support of ./mach clang-format -p <file/dir> r=gps
MozReview-Commit-ID: nmAqNsSWho
2017-06-29 09:35:23 -07:00
Sylvestre Ledru
fdc3855ba2 Bug 1376803 - Move the clang-format diff into a specific function r=gps
MozReview-Commit-ID: C7cy5U0HJ8
2017-06-27 18:34:39 -07:00
Gregory Szorc
fb1459dbbc Bug 1293493 - Remove mach rage since it was unused; r=ted
We've had 4 submissions in 2017. jgriffin and I agreed that it was a
failed experiment and we should either abandon it or figure out how
to increase participation. Since nobody is available to improve it,
I'm inclined to just delete it. If we want to bring it back, it is
always in version control.

MozReview-Commit-ID: AizkZxjQ8IJ
2017-04-24 16:33:51 -07:00
Bryce Van Dyk
60f9206d2f Bug 1325481 - Update clang-format fetch/locate codepath to gracefully fail. r=sylvestre
The checking on the return of value of fetch/locate is not working as intended.
The code should be early returning, but the return value of fetch/locate is 1 in
failure cases, which will not trigger the early return. The return value has
been altered to None, which will trigger the early return.

MozReview-Commit-ID: FDCW6rbZI6T
2016-12-23 11:15:00 +13:00
Chris Pearce
c27cc61b9e Bug 1348982 - Make 'mach clang-format' format the current revision instead of the tip. r=gps
Currently the mach clang-format command is formating '-r tip^', which is
everything in the tip revision, plus changes. Often this does what you want,
but if you're using changeset evolution or history rewriting this doesn't work
so well.  If you `hg up $rev` to some other revision with the intention of
clang-formating that revision, you don't get that revision formated when you
run clang-format. You get the lines touched by the changeset with the "tip"
bookmark formatted. We really want to have clang-format format '-r .^' which
means "the current revision in the working dir, plus any uncommited changes".

This results in the expected behaviour, and means clang-format can be used to
re-format commits which are work-in-progress and/or being evolved.


MozReview-Commit-ID: iv82HENxiA
2017-03-21 10:31:15 +13:00
Sylvestre Ledru
3426a4aa4f Bug 1347474 - Update mach to download clang-format 5.0 r297730 r=andi
MozReview-Commit-ID: 69HZXo00gnG
2017-03-15 11:20:54 +01:00
Sylvestre Ledru
96b5280905 Bug 1329191 - Download clang-format 4.0 from tooltool and add a checksum check. Flake8 on the rest of the file r=gps
MozReview-Commit-ID: FKTrXgVdjZs
2017-01-06 15:52:07 +01:00
Sylvestre Ledru
6e74167c90 Bug 1329191 - Download clang-format 4.0 from tooltool and add a checksum check r=gps
MozReview-Commit-ID: 2ta8m6yHXZc
2017-01-06 15:51:40 +01:00
Sylvestre Ledru
fd7c30ad4d Bug 1324382 - Update mach to download clang-format 4.0 r=gps
MozReview-Commit-ID: INeMSbEloA3
2016-12-19 15:28:16 +01:00
Gregory Szorc
1a1bdef8d5 Bug 1292668 - mach rage; r=jgriffin
This commit introduces the `mach rage` command. It opens a web browser
and loads a new tab with a short Google Form.

Google Forms appears to not have optional login where they capture login
info if available. So, we attempt to prepopulate the contact info
from version control or from the current login name. This field
is directly above the submit button, so it should be obvious enough
that people can clear it if they want to leave an anonymous response.

The alternative is we require a login to the Mozilla Google Apps
account. And that feels wrong.

r+ on this bug also constitutes r+ on the Google Form content.

MozReview-Commit-ID: HVAVVVva29T
2016-08-05 13:35:12 -07:00
Ting-Yu Lin
37a2690c0a Bug 1285484 - Remove "mach mxr" command. r=gps
Remove it due to the announcement "MXR permanently offline".
https://groups.google.com/forum/#!topic/mozilla.dev.platform/_k-ditFrne4

MozReview-Commit-ID: HvQ18uABGec
2016-07-08 16:31:30 +08:00
Gregory Szorc
06a52769ba Bug 1244736 - Remove mach update-uuids and related code; r=froydnj
We no longer update UUIDs when changing XPIDL interfaces. `mach
update-uuids` was invented to make this process easier. Delete the
command and related code since it is no longer needed.
2016-02-01 16:10:08 -08:00
Julien Pagès
06b2e3461b Bug 1209772 - 'mozregression was installed. please re-run your command.' when running ./mach mozregression. r=ahal 2015-10-05 22:08:35 +02:00
Julien Pagès
f94b01a2d7 Bug 1200293 - mach target for mozregression. r=ahal 2015-09-05 18:27:23 +02:00
Peter Elmers
593abe60fb Bug 1186896 - Fix import statements for mach update-uuids. r=gps 2015-07-23 08:00:02 -07:00
Gregory Szorc
bf1e7d6808 Bug 1176642 - Defer import of urllib2; r=chmanchester
This prevents 8 module imports from occurring at mach startup time.

As part of this, I discovered a redundant import of "sys" and eliminated
it.
2015-06-25 12:12:15 -07:00
Gregory Szorc
d993a444fa Bug 1176642 - Use absolute_import in mach_commands.py files; r=glandium
This removes ambiguity as to which modules are being imported, making
import slightly faster as Python doesn't need to test so many
directories for file presence.

All files should already be using absolute imports because mach command
modules aren't imported to the package they belong to: they instead
belong to the "mach" package. So relative imports shouldn't have been
used.
2015-06-21 17:39:09 -07:00
Mike Hommey
88fff6ec91 Bug 1157299 - Post to pastebin as "Anonymous" instead of "None" by default. r=gps 2015-04-25 08:28:25 +09:00
Mike Hommey
bc5f1aef65 Bug 1157299 - Use HTTPS for mach pastebin. r=gps
Submitting to HTTP just redirects to the main page on HTTPS, without storing the paste.
2015-04-25 08:28:24 +09:00
Mike Hommey
2e51d2ef87 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
Gregory Szorc
2a7f78955a Bug 1103052 - Remove traces of RBTools; r=mconley
We previous added support for RBTools in bug 943747 and bug 945577. Now
that we have MozReview, this functionality is next to useless. MozReview
is the future. So, we remove the old RBTools code.

DONTBUILD (NPOTB)
2014-11-21 10:49:56 -08:00
Mike Hommey
711c2629f1 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
Vikrantsingh Bisen
d2ef940bab Bug 1053067 - Correct a misspelling of "version" in mach. r=edmorley 2014-08-15 23:45:00 -04:00
Ed Morley
0385d92ce2 Bug 1010082 - Fix |mach dxr| URL; f=erikrose 2014-05-14 16:26:17 +01:00
Gregory Szorc
7c4ee865c6 NO BUG - Install RBTools 0.6
We were previously installing a pre-release of RBTools from Git. The
patches we were waiting on are now in RBTools 0.6. So, install the
released version from PyPI.

DONTBUILD (NPOTB)
2014-04-08 16:03:35 -07:00
Anthony Jones
16f93f67cb Bug 983633 - Error if filterdiff is required; r=gps 2014-03-21 17:43:28 +13:00
Anthony Jones
58bf50417e Bug 965120 - Git support for mach clang-format; r=gps 2014-01-30 14:27:44 +13:00
Anthony Jones
4990e26954 Bug 965120 - Use .clang-format to set tree default format; r=gps 2014-01-30 14:27:44 +13:00
Anthony Jones
4731c7a868 Bug 965120 - Add --show option to mach clang-format; r=gps 2014-01-30 14:27:44 +13:00
Anthony Jones
ca8fb06d24 Bug 962954 - Add clang-format downloading support for OSX; r=gps 2014-01-28 14:11:46 +13:00