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

102 Коммитов

Автор SHA1 Сообщение Дата
Andrew Halberstadt 572bdc8e0e Bug 1409733 - [mozversioncontrol] Add ability to update/checkout another revision, r=firefox-build-system-reviewers,mhentges
The specific use case here will be to help implement a new |mach taskgraph
--diff| command later on in this stack.

Differential Revision: https://phabricator.services.mozilla.com/D107270
2021-03-09 16:18:23 +00:00
Butkovits Atila de782976bf Backed out changeset 5153f0eaf518 (bug 1676533) as requested by glandium. CLOSED TREE 2020-12-02 07:58:47 +02:00
Ricky Stewart c9720a8ee7 Bug 1676533 - Consult the base revision for file hashes instead of the on-disk files in `mach artifact` r=ahal
This enables `mach artifact` and `mach bootstrap` to not fail due to local changes.

Differential Revision: https://phabricator.services.mozilla.com/D96892
2020-11-20 18:58:51 +00:00
Cristina Coroiu e1be39b9e8 Backed out changeset 101792a18a59 (bug 1676533) on request by Ricky for causing regressions 2020-11-18 18:10:04 +02:00
Ricky Stewart ddc8d97c34 Bug 1676533 - Consult the base revision for file hashes instead of the on-disk files in `mach artifact` r=ahal
This enables `mach artifact` and `mach bootstrap` to not fail due to local changes.

Differential Revision: https://phabricator.services.mozilla.com/D96892
2020-11-16 18:51:03 +00:00
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
Mitchell Hentges 3d3a31abb7 Bug 1667750: safely handle unexpected hg ui.username format r=firefox-build-system-reviewers,rstewart
If the "ui.username" config option doesn't have a value in the expected
format, assume that the user email address is unknown instead of
throwing an exception.

Differential Revision: https://phabricator.services.mozilla.com/D91626
2020-09-28 19:02:35 +00:00
Ricky Stewart 9ad232391e Bug 1659602 - Fix type error in `mozversioncontrol` for Windows+`hg`+Python 3 r=dmajor
These arguments will get converted to `bytes` later on if necessary; if we don't defer to `hglib`, then we need proper strings.

Differential Revision: https://phabricator.services.mozilla.com/D87440
2020-08-18 12:51:49 +00:00
Ricky Stewart 9719a9a5a9 Bug 1636797 - In `hash.py`, enumerate files from the VCS rather than searching the filesystem directly r=ahal
This resolves a long-standing issue in development where `mach artifact` (and therefore `mach bootstrap`) would fail unpredictably if you had dirty, but ignored, files in your checkout. Resolving this problem often required unwieldy `hg purge`/`git ignore` incantations that are easy to get wrong.

This patch addresses the problem by doing what we "should" have been doing all along, and consulting the VCS to list tracked files rather than listing EVERY file on disk and applying heuristics to determine whether they should be included in the hash.

Differential Revision: https://phabricator.services.mozilla.com/D86780
2020-08-17 15:19:34 +00:00
Ricky Stewart f6051c3aa8 Bug 1658626 - When listing files from git in `mozversioncontrol`, ignore empty paths r=froydnj,mhentges
Without this patch, the last "path" in this list will always be the empty string due to how the `-z` option to `git` works. This mirrors what we already do in the `get_files_in_working_directory` implementation for `hg`.

Differential Revision: https://phabricator.services.mozilla.com/D86752
2020-08-12 00:10:43 +00:00
Mitchell Hentges b88610e3b1 Bug 1645196: Tune git settings to improve performance r=rstewart
Also adds a warning if a user's git version is older than 2.24

Differential Revision: https://phabricator.services.mozilla.com/D82128
2020-07-10 12:54:24 +00:00
Sebastian Hengst 4804061533 Backed out changeset d72c64af2c23 (bug 1645196) for very frequently failing remote(pup) task 2020-07-10 12:13:10 +02:00
Mitchell Hentges 99012368cc Bug 1645196: Tune git settings to improve performance r=rstewart
Also adds a warning if a user's git version is older than 2.24

Differential Revision: https://phabricator.services.mozilla.com/D82128
2020-07-07 18:29:37 +00:00
Mitchell Hentges 87092a1009 Bug 1649565: Sentry setup should support user-less VCS setups r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D81792
2020-07-02 18:31:05 +00:00
Mitchell Hentges 018693001f Bug 1646832: Don't report Sentry issues for build team members r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D80913
2020-06-29 17:58:06 +00:00
Kagami Sascha Rosylight 0c5130e3a4 Bug 1643192 - Use git log to get base ref r=glandium
Since there are still needs for .base_ref(), this uses git log way to get base commit.

Differential Revision: https://phabricator.services.mozilla.com/D78183
2020-06-18 06:39:55 +00:00
Mitchell Hentges 1b525e3c0c Bug 1640815: Raise helpful error if no non-public commits on bootstrap r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D77505
2020-05-29 18:35:35 +00:00
Ricky Stewart 492cfe7265 Bug 1637333 - Ensure we don't pass bad environment variables to `subprocess.check_call()` in `mozversioncontrol` r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D74888
2020-05-12 16:58:21 +00:00
Andrew Halberstadt c44fed4839 Bug 1637305 - [mozversioncontrol] Don't use bytes in HGRepository.working_directory_clean, r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D74880
2020-05-12 16:49:24 +00:00
Ricky Stewart 853de17575 Bug 1633494 - Augment `hg` command used to get commit time r=glandium
`hg` gives us some additional levers to tweak when determining which commits are public and non-public. All the better, because `hg`'s default behavior under a rebase is to preserve the original commit time, so if you rebase a month-old commit on the latest version of central, you might still get the "revision too old" error despite your tree actually being completely up-to-date. Here we replace the original logic with something a little bit more robust to that scenario.

As before, this is a best-effort check that might have false positives or false negatives; this commit doesn't change that, but hopefully it decreases the amount of false positives under `hg`.

Differential Revision: https://phabricator.services.mozilla.com/D74745
2020-05-12 15:53:14 +00:00
Ricky Stewart 3749c34fb4 Bug 1632916 - Run JS/web-platform/ipdl build machinery in Python 3 r=jgraham,nika,glandium
Differential Revision: https://phabricator.services.mozilla.com/D72478
2020-05-05 20:32:12 +00:00
Bogdan Tara f137fa0613 Backed out 6 changesets (bug 1632916, bug 1599658, bug 1633037, bug 1633039, bug 1633016, bug 1632920) for SA bustages CLOSED TREE
Backed out changeset 332ce0963b4e (bug 1633039)
Backed out changeset a9904cbc40d9 (bug 1633037)
Backed out changeset d06b0ec349f8 (bug 1599658)
Backed out changeset 8fd300cad80f (bug 1633016)
Backed out changeset f8820941c703 (bug 1632916)
Backed out changeset ac9c2c8746ed (bug 1632920)
2020-05-02 01:49:29 +03:00
Ricky Stewart d990224458 Bug 1632916 - Run JS/web-platform/ipdl build machinery in Python 3 r=jgraham,nika,glandium
Differential Revision: https://phabricator.services.mozilla.com/D72478
2020-05-01 16:31:21 +00:00
Kagami Sascha Rosylight be0aac133d Bug 1543872 - Use `git log --not --remotes` r=glandium
The current way to get outgoing files in Git passes every branch to merge-base, which generates a way too long command that fails on Windows. This patch tries using `git log --not --remotes` instead of passing merge-base value.

Differential Revision: https://phabricator.services.mozilla.com/D71802
2020-04-28 07:27:51 +00:00
Tom Prince 07fa71e0fe Bug 1632688: [mozversioncontrol] Don't try to add files if none are provided; r=ahal,rstewart a=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D72414
2020-04-24 12:18:26 -06:00
Ricky Stewart a68fb761e8 Bug 1630668 - Fix incompatible type signatures in subclasses of Repository r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D71200
2020-04-16 17:07:19 +00:00
Ricky Stewart c9156704b1 Bug 1630317 - Add a warning if there is an attempt to mach bootstrap from an "old commit" r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D71076

--HG--
extra : moz-landing-system : lando
2020-04-15 20:58:58 +00:00
Tom Prince 01409a49a6 Bug 1630047 - Allow mozversioncontrol to add or remove multiple files at once; r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D70938

--HG--
extra : moz-landing-system : lando
2020-04-15 22:16:49 +00:00
Steve Fink 86ca4b5374 Bug 1621322 - Implement `mach lint --revset=REV` r=ahal
In the process, fixed a few bugs:
 - the template eg `{file_adds % "\n{file}"}` produced a leading blank line,
   which led to everything being linted.
 - 'd' was replaced with 'r' in diff_filters, but the replacement was discarded.
 - as a result of the above, `hg status -d` was being used ("show only deleted (but tracked) files") and now it is `hg status -r` ("show only removed files"). I *think* this is what was intended?

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

--HG--
extra : moz-landing-system : lando
2020-03-22 22:12:18 +00:00
Steve Fink eac1725c91 Bug 1621322 - mozversioncontrol: pre-existing bug fix, do not run git test under hg r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D67584

--HG--
extra : moz-landing-system : lando
2020-03-22 22:11:55 +00:00
Geoff Brown 23f67ba1d1 Bug 1622789 - Remove mozversioncontrol dependency on distutils; r=ahal
Use mozfile.which instead of distutils.

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

--HG--
extra : moz-landing-system : lando
2020-03-18 17:12:14 +00:00
Mike Shal 5701a85794 Bug 1611006 - Convert python/mozbuild/mozbuild/test/action to python3; r=firefox-build-system-reviewers,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D60769

--HG--
extra : moz-landing-system : lando
2020-02-28 20:56:31 +00:00
Daniel Varga 3d8a78a06f Backed out changeset 6851f568b173 (bug 1611006) for causing nightly bustages a=backout 2020-01-31 03:30:45 +02:00
Mike Shal 3fe87081bf Bug 1611006 - Convert python/mozbuild/mozbuild/test/action to python3; r=firefox-build-system-reviewers,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D60769

--HG--
extra : moz-landing-system : lando
2020-01-30 09:52:25 +00:00
Edwin Takahashi b66e852ab2 Bug 1592855 - run mach vendor python with python3 r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D51414

--HG--
extra : moz-landing-system : lando
2019-11-05 15:29:44 +00:00
Ricky Stewart 16a6c7da5c Bug 1587232 - ./mach vendor rust leaves the tree in an unclear state if it would bring in a file that's too large r=firefox-build-system-reviewers,mshal
Add code to clean up Git and Hg repositories, and invoke that where `./mach vendor rust` would throw an error. Unfortunately, `cargo vendor` also updates the repo's root `Cargo.lock` file in-place and while we could `git checkout`/`hg revert` that file for the user, `Cargo.lock` may have had pre-existing changes that would be overwritten by such a change. Instead of a potentially destructive update in the error case, I've opted to add an extra error message to tell you how to deal with that one file.

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

--HG--
extra : moz-landing-system : lando
2019-10-21 18:23:36 +00:00
Andrew Halberstadt 9067e54ba4 Bug 1586010 - [mozversioncontrol] Ensure env in appropriate format for subprocess, r=chmanchester
Environment should be bytes on Python 2 (to avoid Windows errors) and text on
Python 3. The 'ensure_subprocess' env utility function handles this.

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

--HG--
extra : moz-landing-system : lando
2019-10-04 15:48:24 +00:00
Mike Hommey b53fa7eb49 Bug 1561632 - Back out bug 1554987. r=ahal
Bug 1554987 made `mach try` use a transient remote, but that causes
problems with existing setups that happen to use the same remote name,
because of a combination of not-quite-as-documented-as-it-should
behavior of git.

- `git -c foo.bar=qux` doesn't override the value of `foo.bar` from the
  git configuration when `foo.bar` is an item that can take several
  values.
- `remote.$remote.url` and `remote.$remote.pushurl` take several values,
  allowing to give several URLs.

The combination of both means that if the git configuration already has
`remote.try.url` set, that value takes precedence (because git push
tries them one after the other, and takes the one from the command line
last)

One way we could increase the chances of things working out fine would
be to use `remote.try.pushurl`, which if already set, is more likely to
be right than an existing `remote.try.url`.

OTOH, it turns out, after more investigation, that bug 1554987 requires
a footgunny setup to happen in the first place. Namely, it requires
having run `git lfs install` from a git-cinnabar clone.

so we just go back to the previous status quo.

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

--HG--
extra : moz-landing-system : lando
2019-06-28 15:58:36 +00:00
L. David Baron f721ff614d Bug 1515105 - Adjust test for turning off git commit.gpgSign when making temporary commits for try pushes. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D35876

--HG--
extra : moz-landing-system : lando
2019-06-26 15:04:01 +00:00
L. David Baron 36f9d91fe8 Bug 1515105 - Turn off git commit.gpgSign when making temporary commits for try pushes. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D35726

--HG--
extra : moz-landing-system : lando
2019-06-25 17:21:47 +00:00
Mike Hommey cff8fe1fbc Bug 1554987 - Invoke git push with a remote name for mach try. r=ahal
The git version shipped in some versions of OSX is patched by apple in a
way such that doing `git push hg::ssh://...` fails with an error message
like `Invalid remote name "hg::ssh://...`.

So instead, we define a named remote via inline configuration, and use
that remote's name for the push.

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

--HG--
extra : moz-landing-system : lando
2019-06-24 21:36:31 +00:00
Dorel Luca 49c9b3a351 Backed out changeset 21826fb830de (bug 1554987) for py2 and py3 failures. CLOSED TREE 2019-06-25 00:28:50 +03:00
Kartikaya Gupta e6c7a2e2b3 Bug 1519598 - Add a commit function in the repository helper. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D35205

--HG--
extra : moz-landing-system : lando
2019-06-24 20:50:04 +00:00
Mike Hommey e5d8e3b235 Bug 1554987 - Invoke git push with a remote name for mach try. r=ahal
The git version shipped in some versions of OSX is patched by apple in a
way such that doing `git push hg::ssh://...` fails with an error message
like `Invalid remote name "hg::ssh://...`.

So instead, we define a named remote via inline configuration, and use
that remote's name for the push.

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

--HG--
extra : moz-landing-system : lando
2019-06-24 14:40:21 +00:00
Aaron Klotz ede6539296 Bug 1520309: Set HGPLAIN env var when running hg push-to-try; r=ahal
If there are a large number of untracked files in the working directory, hg
will attempt to print them all out with the default pager. This does not
interact very will with commands that are built atop this functionality. We
set HGPLAIN=1 so that the underlying hg will not attempt to use a pager.

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

--HG--
extra : moz-landing-system : lando
2019-04-09 21:10:49 +00:00
Andrew Halberstadt 0e9c1caf7d Bug 1515261 - [mozversioncontrol] Fix unicode env string on Windows, r=sheehan
Differential Revision: https://phabricator.services.mozilla.com/D15727

--HG--
extra : moz-landing-system : lando
2019-01-07 16:26:49 +00:00