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

15 Коммитов

Автор SHA1 Сообщение Дата
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
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
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
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
Andrew Halberstadt 21dc8454f4 Bug 1472177 - Run mozversioncontrol tests under python 3 r=gps
This also enables the py2 linter which will help maintain compatibility
with both 2 and 3.

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

--HG--
extra : moz-landing-system : lando
2018-07-24 21:21:46 +00:00
Andrew Halberstadt 5935acc8f0 Bug 1475649 - [mozversioncontrol] Make vcs.working_directory_clean() ignore untracked files by default r=jgraham
The doc string for the "working_directory_clean" function states:
> By default, untracked and ignored files are not considered.

But the git implementation for this function used to run:
git status --porcelain

Which *does* consider untracked files by default. Instead, we need to run:
git status --porcelain --untracked-files=no

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

--HG--
extra : moz-landing-system : lando
2018-07-13 20:54:08 +00:00
Andrew Halberstadt 0ad2e9342d Bug 1413922 - [tryselect] Merge vcs.py into mozversioncontrol r=gps
Differential Revision: https://phabricator.services.mozilla.com/D1808

--HG--
rename : tools/tryselect/vcs.py => tools/tryselect/push.py
extra : moz-landing-system : lando
2018-07-10 19:22:00 +00:00
Andrew Halberstadt 812d9fb038 Bug 1413922 - [mozversioncontrol] Always use hglib.client if available and fall back to subprocesses if not, r=gps
Most HG commands use subprocesses, even if a context manager (and therefore an
hglib client) has been created. There are only two commands that make use of
the client, but they *only* work inside a context manager. I don't think
there are any technical reason these two commands *need* to use the context
manager.

This patch merges the HgRepository._run_in_client function with
HgRepository._run(). If a client exists, that will be used, otherwise a
subprocess will be used.

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

--HG--
extra : moz-landing-system : lando
2018-07-10 20:41:49 +00:00
Coroiu Cristina 07726be245 Backed out 2 changesets (bug 1413922) for breaking Nightly L10n a=backout
Backed out changeset e7a1d749ff9a (bug 1413922)
Backed out changeset b3bead1f5729 (bug 1413922)

--HG--
rename : tools/tryselect/push.py => tools/tryselect/vcs.py
2018-07-10 03:11:28 +03:00
Andrew Halberstadt 23c2416671 Bug 1413922 - [tryselect] Merge vcs.py into mozversioncontrol r=gps
Differential Revision: https://phabricator.services.mozilla.com/D1808

--HG--
rename : tools/tryselect/vcs.py => tools/tryselect/push.py
extra : moz-landing-system : lando
2018-07-07 00:32:11 +00:00
Andrew Halberstadt cd200f6d34 Bug 1413922 - [mozversioncontrol] Always use hglib.client if available and fall back to subprocesses if not, r=gps
Most HG commands use subprocesses, even if a context manager (and therefore an
hglib client) has been created. There are only two commands that make use of
the client, but they *only* work inside a context manager. I don't think
there are any technical reason these two commands *need* to use the context
manager.

This patch merges the HgRepository._run_in_client function with
HgRepository._run(). If a client exists, that will be used, otherwise a
subprocess will be used.

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

--HG--
extra : moz-landing-system : lando
2018-06-26 00:13:58 +00:00
Andrew Halberstadt 9435736ade Bug 1471620 - Skip python-tests locally that don't run with python 3 in CI r=davehunt
This will make sure that when running |mach python-test --python 3| locally,
we only run the tests that also run in CI with python 3 (and therefore pass
presumably).

MozReview-Commit-ID: 3OBr9yLSlSq

--HG--
extra : rebase_source : 456340d0ecdddf1078f2b5b4ebb1eddf3813b26a
2018-06-27 11:10:02 -04:00
Andrew Halberstadt a73d388c79 Bug 1401309 - [mozlint] Remove vcs.py and use mozversioncontrol instead, r=gps
This also migrates the vcs.py test to mozversioncontrol and adds a new task for
it.

MozReview-Commit-ID: 9jTRkjNupVA

--HG--
extra : rebase_source : 400f27498e00ea45234ad7c951770b098e916b8e
2017-09-25 16:30:27 -04:00