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

80 Коммитов

Автор SHA1 Сообщение Дата
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Ricky Stewart 18cc8129db Bug 1666517 - `./mach busted` shows recent resolved bugs as well as unresolved bugs r=mhentges,dmajor DONTBUILD
The idea here is that if someone else reported a bug and it got fixed immediately, but you don't have the fix yet for whatever reason (e.g you haven't pulled to the latest `central` or whatever), then you'll see it here. I've chosen 15 days as the cutoff basically arbitrarily.

Differential Revision: https://phabricator.services.mozilla.com/D91062
2020-09-23 20:40:25 +00:00
Ricky Stewart 31755b431d Bug 1657650 - Require that Mach command providers subclass MachCommandBase. r=remote-protocol-reviewers,marionette-reviewers,maja_zf,mhentges,froydnj
Today we don't require that `mach` `CommandProvider`s subclass from any particular parent class and we're very lax about the requirements they must meet. While that's convenient in certain circumstances, it has some unfortunate implications for feature development.

Today the only requirements that we have for `CommandProvider`s are that they have an `__init__()` method that takes either 1 or 2 arguments, the second of which must be called `context` and is populated with the `mach` `CommandContext`. Again, while this flexibility is occasionally convenient, it is limiting. As we add features to `mach`, having a better idea what the shape of our `CommandProvider`s are and how we can instantiate them and use them is increasingly important, and this gives us additional control when having `mach` configure `CommandProvider`s based on data that is only available at the `mach` level. In particular, we plan to leverage this in bugs 985141 and 1654074.

Here we add validation to the `CommandProvider` decorator to ensure all classes inherit from `MachCommandBase`, update all `CommandProvider`s in-tree to inherit from `MachCommandBase`, and update source and test code accordingly.

Follow-up work: we now require (de facto) that the `context` be populated with a `topdir` attribute by the `populate_context_handler` function, since instantiating the `MachCommandBase` requires a `topdir` be provided. This is fine for now in the interest of keeping this patch reasonably sized, but some additional refactoring could make this cleaner.

Differential Revision: https://phabricator.services.mozilla.com/D86255
2020-08-07 18:24:59 +00:00
Eric Rahm 6611c40970 Bug 1306503 - Add logspam mach commands. r=firefox-build-system-reviewers,mhentges,rstewart
This adds support for invoking the |mach logspam {report|file|bisect}|
commands. The core logic from the pypi base command is reused.

Differential Revision: https://phabricator.services.mozilla.com/D85493
2020-08-03 18:44:18 +00:00
Eric Rahm a442c0fca4 Bug 1306503 - Split out a reusable pypi tool class. r=firefox-build-system-reviewers,mhentges,rstewart
This splits out the pypi tool logic baked into the mozregression command. It
will be reused for the logspam command.

Differential Revision: https://phabricator.services.mozilla.com/D85492
2020-08-03 18:44:10 +00:00
neil 974e53c285 Bug 1639509 Remove mach uuid r=championshuttler,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D79540
2020-07-13 15:43:24 +00:00
Andrew Halberstadt d0fbcca0b6 Bug 985141 - [mozbuild] Remove leading underscore from MozbuildObject._activate_virtualenv, r=firefox-build-system-reviewers,perftest-reviewers,andi,AlexandruIonescu,rstewart
This function is used all across the tree and should be considered a public API.

Differential Revision: https://phabricator.services.mozilla.com/D85045
2020-07-28 16:06:10 +00:00
Dan Mosedale e9c23bbb90 Bug 1652173 - implement `mach node` and `mach npm`, r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D83204
2020-07-13 21:31:31 +00:00
Ricky Stewart 7bee84802f Bug 1641992 - Add argument to `mach busted file` to specify which component the bug should be filed against r=froydnj
With the addition of this change, a lone `mach busted file` will throw an error (since this should only ever be used by actual humans, and not in automation or anything, the backwards-compatibility breakage isn't a huge deal). Now it's expected to pass in `mach busted file $COMMAND`, where $COMMAND is the mach command that you were running when the error occurred, and we'll figure out which bugzilla component to file the bug against for you instead of directing it to `Firefox Build System :: General` regardless of whether the issue has *anything* to do with the build system. We preserve `mach busted file general` as a backup command that doesn't do any of this heavy logic.

Differential Revision: https://phabricator.services.mozilla.com/D77538
2020-06-01 16:23:48 +00:00
Tilden Windsor 3a9676792b Bug 1639483 - Remove "mach search". r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D76305
2020-05-21 15:49:57 +00:00
Connor Sheehan 71b33e1850 Bug 1574977: restore `mach pastebin` and port to new service r=nalexander
This commit re-implements `mach pastebin` for use with the new Mozilla
pastebin tool (paste.mozilla.org). As with the old implementation, the
tool supports passing a file for upload as well as reading content to
paste from stdin.

`dpaste` (the software that runs `paste.mo`) is supposed to support
sniffing the correct syntax highlighter from the given filename, but
this feature does not seem to work (both on `paste.mo` nor `dpaste.de`).
Instead we have a mapping of known filename extensions to known available
highlighters on `paste.mo`. `mach pastebin` will attempt to guess a
highlighter from the file extension or the basename of the file if none
is available.

Differential Revision: https://phabricator.services.mozilla.com/D42902

--HG--
extra : moz-landing-system : lando
2019-08-22 18:11:26 +00:00
Edwin Gao 892c0866e2 Bug 1559975 - fix python2 lint issues in tools/mach_commands.py r=ahal,catlee
Changes:
- add `print_function` to satisfy py2 linter

Differential Revision: https://phabricator.services.mozilla.com/D37117

--HG--
extra : moz-landing-system : lando
2019-07-19 14:50:07 +00:00
Bobby Holley 8864a06b2a Bug 1543246 - Implement |./mach busted|. r=froydnj
Depends on D26817

Differential Revision: https://phabricator.services.mozilla.com/D26818

--HG--
extra : moz-landing-system : lando
2019-04-10 16:26:44 +00:00
Bobby Holley 92dd11b20e Bug 1543246 - Add searchfox support to mach. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D26817

--HG--
extra : moz-landing-system : lando
2019-04-10 16:26:42 +00:00
Chris Manchester 2a2d1b1a0e Bug 1480362 - Remove |./mach pastebin| command now that the service is no longer available. r=firefox-build-system-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D19085

--HG--
extra : moz-landing-system : lando
2019-02-08 19:50:29 +00:00
Tom Ritter 8728bdccf7 Bug 1455378 Give an informative error message of you try to ./mach pastebin too large a file. r=gps
--HG--
extra : rebase_source : 719fb33701b159955494031708d9366a57b31f9a
2018-04-19 17:31:00 +00:00
Andi-Bogdan Postelnicu 9ca255c241 Bug 1405554 - Merge clang-format with clang-tidy under the same package from toolchains. r=gps
MozReview-Commit-ID: 1XokTUVmVPL

--HG--
extra : rebase_source : bd52ecd720eb3a0a145660c3c5b55922f571f9fb
2018-02-09 09:01:17 +02:00
Margareta Eliza Balazs 9ab2f0f44f 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 51fc404396 Bug 1405554 - Merge clang-format with clang-tidy under the same package from toolchains. r=gps
MozReview-Commit-ID: 1XokTUVmVPL

--HG--
extra : rebase_source : 13cab9c90d98da10dcafbe788c4e8b67fcd56803
2018-01-31 11:02:23 +02:00
hrdktg cfc465ea00 Bug 1419986 - Fix ./mach clang-format when run without path argument. r=sylvestre
MozReview-Commit-ID: EdYpYzFHXeM

--HG--
extra : amend_source : 29ce6eddc34d1bfdef856cd0b2286bbf4f67e5ed
2017-11-22 13:06:14 +05:30
hrdktg 08472314bf 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 8aad132e5c 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

--HG--
extra : rebase_source : ed196a2a86793d6601f590ce04744ebc7f3cd303
2017-10-30 18:36:28 +01:00
Sebastian Hengst 8d87f8dc5c 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
--HG--
extra : rebase_source : 9aa7815837319af97673a17aae6096b297b9564d
2017-10-31 16:20:11 +01:00
Sylvestre Ledru 751ec47c7c 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

--HG--
extra : rebase_source : 87ca393854f1dfc4f3959e91677a4cbc6fb80287
2017-10-30 18:36:28 +01:00
Sylvestre Ledru e0bda6ceaf Bug 1410938 - Make mach_commands.py flake8/pep8 compatible and add it the list of flake8 files r=gps
MozReview-Commit-ID: HKWsDehR0vZ

--HG--
extra : rebase_source : 1e77f8aee5f909dd7b4cfaace6014015c51cf589
2017-10-23 18:40:22 +02:00
Sylvestre Ledru c879ade558 Bug 1410938 - Split the clang-format calls into batches of 200 files r=gps
MozReview-Commit-ID: 3cH295RBcv3

--HG--
extra : rebase_source : 68765af2185f73820963da052d3aec036358a2e5
2017-10-23 18:14:32 +02:00
Sylvestre Ledru 10aea37400 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 5c735fdea1 Bug 1397457 - Update mach to download clang-format 5.0 r=andi
MozReview-Commit-ID: EF3thvpxg6G

--HG--
extra : rebase_source : e5db9ed4ff526973eea091e3af79cd8aff2fc427
2017-09-06 23:56:34 +02:00
Xavier ALT f8d3bcf27f Bug 1392012 - ./clang-format with git should exclude files from .clang-format-ignore r=sylvestre
MozReview-Commit-ID: KsgPnN9aDTC

--HG--
extra : rebase_source : c7d245eae583b2c29b07f130d311a864606219a0
2017-08-24 23:41:44 +02:00
Xavier ALT 7e2ea48a18 Bug 1389956 - extract clang format diff command generation into its own method r=sylvestre
MozReview-Commit-ID: 8kbZcfMBe4J

--HG--
extra : rebase_source : 77a38c8812075c0d8258d427eb11827be51bfac1
2017-08-23 00:24:23 +02:00
Rok Garbas f3a3affcf2 Bug 1284475 - migrate ToolTool blueprint to new codebase of relengapi r=KWierso
UPGRADE_NSS_RELEASE a=kaie
MozReview-Commit-ID: 7CB1VYb8OJP

--HG--
extra : rebase_source : 04751620add813cd1780898d109d9f7fa89d7b2d
2017-08-08 10:55:52 +02:00
Gregory Szorc ad141eef1b 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

--HG--
extra : rebase_source : 4c24adaf7eb9d62678ac78604e819a7376d4073b
2017-08-22 20:04:55 -07:00
Sylvestre Ledru 89677ada26 Bug 1391231 - Use the list provided by .clang-format-ignore instead of only thirdpartypath.txt r=gps
MozReview-Commit-ID: CY1fS7Fg1y

--HG--
extra : rebase_source : a419bfba44e2e74e3ac9f7592d6da04b702590ec
2017-08-17 15:22:06 +02:00
Xavier ALT 53bbc12c9a Bug 1387035 - Update clang-format methods to use mozversioncontrol for hg/git detection r=gps
MozReview-Commit-ID: IZTPYtTxuKu

--HG--
extra : rebase_source : dda9f730cad1635874842a043a1b83450995d236
2017-08-15 23:23:30 +02:00
Prithviraj Pawar 6e753a8ef2 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

--HG--
extra : rebase_source : 57693361d49137f53396461c0c4c0c7df4cd2aaa
2017-08-12 23:35:51 +05:30
Sylvestre Ledru 3aab9a7979 Bug 1376803 - add support of ./mach clang-format -p <file/dir> r=gps
MozReview-Commit-ID: nmAqNsSWho

--HG--
extra : rebase_source : 880980ae1a458c06fe66d7ce60d0a66fee7cd883
2017-06-29 09:35:23 -07:00
Sylvestre Ledru dbf920a78e Bug 1376803 - Move the clang-format diff into a specific function r=gps
MozReview-Commit-ID: C7cy5U0HJ8

--HG--
extra : rebase_source : 7113cfa45a2c50a756cacceba6d73e73c86942c8
2017-06-27 18:34:39 -07:00
Gregory Szorc 332db65e17 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

--HG--
extra : rebase_source : 0e29058cfc909fb51fc56fa9b46c0e0a6eef0bf9
2017-04-24 16:33:51 -07:00
Bryce Van Dyk 19caff72af 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

--HG--
extra : rebase_source : 8b087174db268d7d6a0bb62e6537f82a3b15b28d
2016-12-23 11:15:00 +13:00
Chris Pearce 106fa550f9 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

--HG--
extra : rebase_source : a1d05472f499f5a68bcaab9ce260d60ecbca067d
2017-03-21 10:31:15 +13:00
Sylvestre Ledru 6b9210f7cd Bug 1347474 - Update mach to download clang-format 5.0 r297730 r=andi
MozReview-Commit-ID: 69HZXo00gnG

--HG--
extra : rebase_source : cf045e62184ce96d1ec2f140178900b65636b4c7
2017-03-15 11:20:54 +01:00
Sylvestre Ledru 6d2f73025d 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

--HG--
extra : rebase_source : 86b9373aab04d7e6fc66e8344f09ab61dcbd4f4c
2017-01-06 15:52:07 +01:00
Sylvestre Ledru 7b9a8fa62e Bug 1329191 - Download clang-format 4.0 from tooltool and add a checksum check r=gps
MozReview-Commit-ID: 2ta8m6yHXZc

--HG--
extra : rebase_source : 827786f672d88137b8f706f583f45da9f4d63f17
2017-01-06 15:51:40 +01:00
Sylvestre Ledru c731ba1568 Bug 1324382 - Update mach to download clang-format 4.0 r=gps
MozReview-Commit-ID: INeMSbEloA3

--HG--
extra : rebase_source : 35dc4214a243d87e35b769f5a624b0f30bb9f208
2016-12-19 15:28:16 +01:00
Gregory Szorc b141da4694 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

--HG--
extra : rebase_source : d00aa424ffd42d8cd5d2d8a85aef8b3c24b59520
2016-08-05 13:35:12 -07:00
Ting-Yu Lin fe24b5c55f 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

--HG--
extra : rebase_source : 2977dcf40f713eb284de8989e257a26263f358c6
2016-07-08 16:31:30 +08:00