Summary:
D13853115 adds `edenscm/` to `sys.path` and code still uses `import mercurial`.
That has nasty problems if both `import mercurial` and
`import edenscm.mercurial` are used, because Python would think `mercurial.foo`
and `edenscm.mercurial.foo` are different modules so code like
`try: ... except mercurial.error.Foo: ...`, or `isinstance(x, mercurial.foo.Bar)`
would fail to handle the `edenscm.mercurial` version. There are also some
module-level states (ex. `extensions._extensions`) that would cause trouble if
they have multiple versions in a single process.
Change imports to use the `edenscm` so ideally the `mercurial` is no longer
imported at all. Add checks in extensions.py to catch unexpected extensions
importing modules from the old (wrong) locations when running tests.
Reviewed By: phillco
Differential Revision: D13868981
fbshipit-source-id: f4e2513766957fd81d85407994f7521a08e4de48
Summary: If the there is no changeset left after sparse skip in `--command` mode, show the result and return, as it's done in manual testing mode.
Reviewed By: markbt
Differential Revision: D13650568
fbshipit-source-id: 8e867a38858d84d9a10078b74e2087318c81b01e
Summary: Adding new test to show that sparse skip with `--command` doesn't show the correct answer
Reviewed By: markbt
Differential Revision: D13650567
fbshipit-source-id: f4b6670fe67d6ef2543efedd91d9760e1e6bc74c
Summary:
Importing anything from python files with explicit breaks embedded
aproach we use on Windows.
For one of the tests, I did add `hg debugshell -c "from hgext import sparse;
print sparse.__file__` just to make sure the same file is used in practice.
Reviewed By: singhsrb
Differential Revision: D13258984
fbshipit-source-id: 4c86e1dccfd4f525a14019dc4b9586d798f2bffe
Summary:
Currently `hg bisect` asks to run test on all commits it picked as a result of bisection, even if the changes between last checked nodes and chosen one relate to the files, which are not in the sparse profile.
And so it updates to the one of such commits, shows that "0 files were updated" and asks to run tests.
In this diff I check next potential node (result of bisecting) if there are changes between last good commit/last bad commit and the node. And go further to the next bisection iteration if the node can be skipped (nothing was changed since last good commit in sparse profile's files, so we can assume that the node is good as well).
If there are changes on both sides: between bad and the node, good and the node, I ask to run tests.
Reviewed By: markbt
Differential Revision: D9629683
fbshipit-source-id: f8c5d82f7b44ac14a9190c846ee65d635e447af1
Summary:
In D7001328 we've added a new feature that skips commtis if there are no
changes relative to the sparse checkout. Unfortunately that causes lots of
treepacks downloads and makes bisect unusable. Let's revert the change.
Reviewed By: ryanmce, farnz
Differential Revision: D7182016
fbshipit-source-id: 274b29ca6a7b4c3faf83883b64f5ad3b0289873e