Commit Graph

14 Commits

Author SHA1 Message Date
Xavier Deguillard
bf08af091a tests: remove fastmanifest requirement
Summary: Fastmanifest is going away, remove it from the test.

Reviewed By: chadaustin

Differential Revision: D18145000

fbshipit-source-id: ee75ebe4eda19caca92fd0a84bf0ae9f48112167
2019-10-28 11:38:49 -07:00
generatedunixname89002005307016
4c76d686a8 Update pyre version for eden
Summary: Automatic upgrade to remove `version` override and silence errors.

Reviewed By: grievejia

Differential Revision: D17956249

fbshipit-source-id: d5c8b5aa73151b3fea67aec35d70f332030da2c9
2019-10-16 16:56:29 -07:00
Andres Suarez
fbdb46f5cb Tidy up license headers
Reviewed By: chadaustin

Differential Revision: D17872966

fbshipit-source-id: cd60a364a2146f0dadbeca693b1d4a5d7c97ff63
2019-10-11 05:28:23 -07:00
generatedunixname89002005289445
13e683608d Update pyre version for eden
Summary: Automatic upgrade to remove `version` override and silence errors.

Reviewed By: sinancepel

Differential Revision: D17135557

fbshipit-source-id: 07afef940271a277c75834892733901d070bfa5f
2019-08-30 13:37:34 -07:00
Chad Austin
b7caa4fb5a remove flatmanifest integration tests
Summary:
Flatmanifest support is going away. Remove over 100 integration tests
for flatmanifest-only repos.

Reviewed By: fanzeyi

Differential Revision: D17064019

fbshipit-source-id: b578ca14a231f0ee1f2fee8b464038c7e2201392
2019-08-26 18:50:29 -07:00
Adam Simpkins
9bfb48c921 update license headers in .py files
Summary:
Update the copyright & license headers in Python files to reflect the
relicensing to GPLv2

Reviewed By: wez

Differential Revision: D15487088

fbshipit-source-id: 9f2138dff41048d2c35f15e09a04ae5a9c9c80dd
2019-06-19 17:02:46 -07:00
Adam Simpkins
9beff99012 add type annotations to most of the integration test functions
Summary:
This updates the integration tests to add type annotations to most functions
that were missing annotations.

In particular this is needed to make pyre happy, as it complains if subclasses
override methods from their parent class and do not specify type annotations
if the parent class did have annotations.

This diff also contains some minor changes to hg_extension_test_base.py to
explicitly declare some abstract methods that it uses.  This was also
necessary to make pyre happy about this ocde.

Reviewed By: strager

Differential Revision: D13051097

fbshipit-source-id: 77567ed2f4d3050f93acefb52e688932d276d587
2018-11-16 19:47:48 -08:00
Adam Simpkins
19ce8cdcd8 update HgRepository.hg() to always return a string
Summary:
Drop the `stdout` and `stderr` arguments, so that this method always return a
string.  Change callers that were previously calling this method with
`stderr=None` to use the `run_hg()` method instead of `hg()`.  `run_hg()`
returns a `subprocess.CompletedProcess` object.

This change simplifies the python type checking, and fixes several existing
type checking errors in the code.  Even though most call sites could be
guaranteed that this function would return a `str`, the type checker wasn't
smart enough to tell that the return type would be fixed based on the argument
values, and so it assumed the result always needed to be checked for `None`.

This also updates the `GitRepository.git()` method in a similar fashion.
However, that was a simpler change since it already returned a `str` in all
cases.

Reviewed By: strager

Differential Revision: D13078095

fbshipit-source-id: a8def2a33edc865ac40279bbcb3ada4dade68374
2018-11-16 19:47:48 -08:00
Adam Simpkins
a0411b8a51 add member type annotations to make pyre happy
Summary:
Add type annotations for class member variables.  The pyre type checker has
some limited automatic type detection for member variables set in
`__init__()`, but in general it expects member variables to be explicitly
declared at the top-level of the class.

Reviewed By: strager

Differential Revision: D13051092

fbshipit-source-id: 080259ab3f422ffae2b908ed610062237105ccbe
2018-11-14 13:03:09 -08:00
Lukasz Langa
deee232d74 Upgrade to 18.5b1
Summary: Mostly empty lines removed and added.  A few bugfixes on excessive line splitting.

Reviewed By: cooperlees

Differential Revision: D8198776

fbshipit-source-id: 4361faf4a2b9347d57fb6e1342c494575f2beb67
2018-05-30 01:11:47 -07:00
Wez Furlong
c83849e5af enable Black python formatting and apply to eden
Summary: No functional changes

Reviewed By: simpkins

Differential Revision: D7945989

fbshipit-source-id: e267e6134d87570427b3fdf5974006dce5774113
2018-05-09 21:37:07 -07:00
Michael Bolin
b07ddbc2b3 Fix flake8 warnings in eden/integration folder.
Summary:
These were making some noise in the Nuclide diagnostics pane.

In the course of making these changes, I ended up reformatting
some files, as well. Perhaps we should flag flake8 and autoformat
violations more aggressively in CI now?

Reviewed By: chadaustin

Differential Revision: D7658030

fbshipit-source-id: b52a29b1cc242967f868dcc8ee46ec1bb9bdfbee
2018-04-18 12:42:33 -07:00
Adam Simpkins
d3f0166b6c add create_git_repo() and create_hg_repo() methods to EdenTestCase
Summary:
This slightly refactors the way that EdenTestCase and EdenRepoTest initialize
repositories.  This removes the `create_repo()` method from EdenTestCase and
replaces it with separate `create_hg_repo()` and `create_git_repo()` methods.

The `EdenRepoTest` subclasses now provide alternate `create_repo()`
implementations instead of `get_repo_class()`.

This cleans up the code a bit, since `create_repo()` no longer takes different
arguments based on what type of repository is being created.  This also will
make it easier in upcoming diffs to further customize the logic that occurs in
`create_hg_repo()`.

Reviewed By: chadaustin

Differential Revision: D7512320

fbshipit-source-id: d268b0ac0ffb33f3dfd34f2dd1917d57033c81aa
2018-04-13 15:07:40 -07:00
Adam Simpkins
1f21fa3361 add an integration test for "hg pull"
Summary:
Add a test that exercises `hg pull`.  This confirms that eden can see new
commits created on the server after Eden and its hg_import_helper processes
have started.  This test gets run in flatmanifest, hybrid treemanifest, and
treeonly mode.

This currently performs pulls using a local peer repository rather than over
SSH.  This does exercise a different code path in mercurial than what typically
occurs in production.  In the future we should perhaps also add a test that
uses a fake SSH helper program to exercise mercurial's sshpeer code paths as
well.

Reviewed By: chadaustin

Differential Revision: D6993788

fbshipit-source-id: 40628c0b3faac0dc8622b605a29b084979b8c089
2018-02-21 18:57:58 -08:00