Summary:
Enables running `check-*` tests from fbsource. This used to check for the existence of a `.hg` folder to detect a repo (so
it can run `hg files`). Internally, we'll always have a repo, and externally we'll likely use git to publish so we'll need another
solution there anyway.
(Note: this ignores all push blocking failures!)
Reviewed By: DurhamG
Differential Revision: D6792787
fbshipit-source-id: 342e29d3a99e82ccd24effb8df02ac6309e80909
Summary:
- Like D6791251, test-fb-hgext-fastmanifest-access.t is a pure fastmanifest test, and I'd like to keep it that way given the rigidity
of the existing output. And plenty of fastmanifest tests remain to test both.
- test-fb-hgext-sparse-extensions.t enables simplecache later on in the test already; I just enabled it earlier, which causes the cache to be warm a bit earlier than before, but I think the difference hardly matters.
This should be the last barrier to default-enabling simplecache.
(Note: this ignores all push blocking failures!)
Reviewed By: DurhamG, quark-zju
Differential Revision: D6792256
fbshipit-source-id: dce775903d312f54f67b4eb05d88779b648359a3
Summary:
simplecache prevents parts of this test from being exercised, since it sits in front. To be sure let's disable it to make sure everything hits fastmanifest.
(Alternatively, we could accept this particular change.)
(Note: this ignores all push blocking failures!)
Reviewed By: DurhamG
Differential Revision: D6791251
fbshipit-source-id: 7eec2931c38b55585a83e4f935f434adbd5dd911
Summary:
This extension can be a bit noisy when defaulted-on. Let's disable its debug output in
tests (except fot its own tests).
Differential Revision: D6777765
fbshipit-source-id: e2a6c6b7527336a1fac24078d2b49eb1e75ecabf
Summary:
The helper could be used in individual tests to enable chg if chg exists.
This allows us to have more precise control on what tests to use chg instead
of using a global flag in run-tests.py.
This makes certain tests containing many hg commands much faster. For example,
`test-revset.t` took 99 seconds before:
% ./run-tests.py test-revset.t --time
.
# Ran 1 tests, 0 skipped, 0 failed.
# Producing time report
start end cuser csys real Test
0.000 99.990 86.410 12.000 99.990 test-revset.t
And 10 seconds after:
% ./run-tests.py test-revset.t --time
.
# Ran 1 tests, 0 skipped, 0 failed.
# Producing time report
start end cuser csys real Test
0.000 10.080 0.380 0.130 10.080 test-revset.t
Also enable it for some other tests. Note the whitelist is not complete. We
probably want to whitelist more tests in the future.
The feature could be opted out by deleting `contrib/chg/chg`.
Reviewed By: phillco
Differential Revision: D6767036
fbshipit-source-id: 8220cf408aa198d5d8e2ca5127ca60e2070d3444
Summary: This manifests itself on MacBooks where dulwich is not installed.
Differential Revision: D6759617
fbshipit-source-id: c90c35ebaa4fd2a14b1ad2fa0fadaca3c6ea8c29
Summary:
This makes it easier to run integration tests where we want to load
additional sets of config files.
Reviewed By: DurhamG
Differential Revision: D6755017
fbshipit-source-id: af062fcc465eee969e1315f9430333908ef38303
Summary:
The keyword extension is rarely used. And it breaks sshaskpass because
Python standard library `collections` (which does not use absolute import)
will import the wrong `keyword` module:
$ hg pull ssh://localhost/foo --debug
pulling from ssh://localhost/foo
running SSH_ASKPASS=/tmp/tmpj_6pDJttysrv/2991364.sh DISPLAY=localhost:10.0 TTYSOCK=/tmp/tmpj_6pDJttysrv/2991364 ssh -oControlMaster=no localhost 'hg -R foo serve --stdio'
sending hello command
sending between command
remote: Traceback (most recent call last):
remote: File "/usr/lib64/python2.7/site-packages/hgext/sshaskpass.py", line 43, in <module>
remote: import collections
remote: File "/usr/lib64/python2.7/collections.py", line 10, in <module>
remote: from keyword import iskeyword as _iskeyword
remote: File "/usr/lib64/python2.7/site-packages/hgext/keyword.py", line 93, in <module>
remote: from mercurial.i18n import _
remote: File "/usr/lib64/python2.7/site-packages/mercurial/i18n.py", line 15, in <module>
remote: from . import (
remote: File "/usr/lib64/python2.7/site-packages/mercurial/encoding.py", line 15, in <module>
remote: from . import (
remote: File "/usr/lib64/python2.7/site-packages/mercurial/error.py", line 17, in <module>
remote: from . import pycompat
remote: File "/usr/lib64/python2.7/site-packages/mercurial/pycompat.py", line 22, in <module>
remote: import cookielib
remote: File "/usr/lib64/python2.7/cookielib.py", line 32, in <module>
remote: import re, urlparse, copy, time, urllib
remote: File "/usr/lib64/python2.7/urlparse.py", line 123, in <module>
remote: from collections import namedtuple
remote: ImportError: cannot import name namedtuple
Reviewed By: singhsrb
Differential Revision: D6766686
fbshipit-source-id: af67a4d8c736158951c737b790904ba11419d432
Summary:
`run-tests.py` should set up `sys.path` correctly so `import mercurial` in
the hgsubversion tests should just work.
Also add a comment in `run-tests.py` to clarify this.
The hgsubversion module check is removed since it assumes the module lives in a
same directory as the test, which is not true with the `run-test.py --rebuild`
case.
Reviewed By: phillco
Differential Revision: D6758588
fbshipit-source-id: ba34253991e671dc972bcb1900243eab6b69fd92
Summary: I noticed that we didn't have any unit tests covering wire protocol argument parsing.
Differential Revision: D6757891
fbshipit-source-id: 17ec2be2f7e6bf193983178938dcc27e23dfff71
Summary:
This ensures that watchman doesn't complain when it starts watching this
directory.
Differential Revision: D6757821
fbshipit-source-id: 30b3e71b9601e74af51ad7ac18e1f197777b9e72
Summary: Otherwise this test will fill up with default-on tests that will be a pain to filter manually. Plus it's a sensible flag to have.
Differential Revision: D6760553
fbshipit-source-id: 083cb2d8a7cffe28eef812edad2f4c5d997db981
Summary:
`_peerorrepo` calls `extensions.extensions()` to figure out on which modules to run reposetup. This uses a slightly
different code path than that patched by D6716674 and double-checks if an extension is enabled. So we need to patch here too.
Reviewed By: quark-zju
Differential Revision: D6758486
fbshipit-source-id: b5bfe2d11e5e2aeb2d3a0ee7c9d6e3e2c213233d
Summary:
This was blocking us default-enabling `fbsparse`; however, this function is actually incredibly fragile and can break with a variety of extensions enabled (even blackbox).
E.g., try this on the latest release and you'll get an exception!
```
cd $(mktemp -d); hg init a; hg share a b; cd b; hg unshare
```
That particular breakage is called by blackbox trying to look at `repo[None]` to do some logging, but anything that tries to read `repo.dirstate` after this will print the exception. The root cause is this line which is trying to override `repo.root`:
```
repo.unfiltered().__init__(repo.baseui, repo.root)
```
It's trying to update the repo's path to indicate that it is independent and no longer shared. But, the initializer isn't really designed to be called twice, AFAICT, and doing so here leaves the property caches out of sync with properties of the repo (namely `_filecache`).
Durham's suggestion was just to nuke `hg unshare`. This patch works around it for now, though, in case we want to keep it alive.
Reviewed By: quark-zju
Differential Revision: D6758397
fbshipit-source-id: 90d3773d9340f2a5b2e6e900a2194d8b931f410d
Summary:
...instead of '(untested!)'.
Partly this is necessitated by the `hg debugextensions` call in test-extension.t (post
D6758486). But it also seems like the right thing to do.
Reviewed By: ryanmce
Differential Revision: D6758599
fbshipit-source-id: 3ecfa52b0c9c1a028201d2eda0eaa706d80225c0
Summary:
Added options supported by diff:
```
-w --ignore-all-space ignore white space when comparing lines
-b --ignore-space-change ignore changes in the amount of white space
-B --ignore-blank-lines ignore changes whose lines are all blank
-Z --ignore-space-at-eol ignore changes in whitespace at EOL
```
Differential Revision: D6738122
fbshipit-source-id: bd4236ce7cb9d5f803f932cfec267de71b0067c2
Summary:
Some consumers still rely on enabling 'sparse=' so let's add a module
that just redirects to the real fbsparse.py.
Also updates configerator to use the newer name.
Reviewed By: markbt, quark-zju
Differential Revision: D6755971
fbshipit-source-id: 3a67f029045dacf927742a616a714fe632b97fea
Summary:
The isgooddelta tweak was introduced in D2693043 (perftweaks: change revlog
delta heuristic, 2015-11-24). Comparing with the existing version, the only
change is that we removed `dist > maxdist` check.
Note that the upstream commit 895ecec31 (revlog: add an experimental option
to mitigated delta issues (issue5480), 2017-06-23) also introduces a config
option to override `maxdist` to make the condition fail, which basically does
a same thing.
Instead of introducing new config options or adding more "if"s to the
codebase to make it more obscure, let's just simplify it by disabling the
check entirely, and removing the `dist` concept, removing two config
options: `experimental.maxdeltachainspan` and `perftweaks.preferdeltas`.
The `chainlen > self._maxchainlen` check should be enough for keeping
delta chain length bounded.
Reviewed By: DurhamG
Differential Revision: D6752529
fbshipit-source-id: e8fd8ec39240191db5fb274190fc661e97087a78
Summary: Added --rebuild for the old behavior.
Reviewed By: phillco
Differential Revision: D6753296
fbshipit-source-id: 84f26af285662f91bc59db8b2a3145212118a9b6
Summary:
Given the multi-core era, it seems to be a good default to make use of all
available cores. Use `-j 1` to get the old behavior.
Reviewed By: phillco
Differential Revision: D6752704
fbshipit-source-id: 842ddea1d89160eed030fc71ba08024859db9268
Summary:
This enables clindex for its nodemap. Verification is turned off by default
for the performance win since we have been running verification in
production for a while.
Reviewed By: phillco
Differential Revision: D6751412
fbshipit-source-id: bc3e87df86e86a758392bdd4aef3e282f397fe04
Summary: Also change the internal API so it no longer accepts the "heads" argument.
Reviewed By: ryanmce
Differential Revision: D6745865
fbshipit-source-id: 368742be49b192f7630421003552d0a10eb0b76d
Summary: This removes the effectflag logic from both core and perftweaks.
Reviewed By: ryanmce
Differential Revision: D6745769
fbshipit-source-id: 55ed1676e7117bca358471c256805ded7bc83f3c
Summary: The tests are landed in core so those tests could be removed.
Reviewed By: ryanmce
Differential Revision: D6745446
fbshipit-source-id: f85c3e7899d4bb24bedb71d84601d7113928a4c4
Summary: To be fixed later, now I need to test the hgbuild.
Differential Revision: D6748921
fbshipit-source-id: 519555286a43ef7852e37b699e30197c1ad85424
Summary:
It's pretty handy. The implementation is simple and clean. So move it from
contrib and enable it by default. "import"s are adjusted to make the module
checker happy.
Security and UX wise, since we have `--debugger` already, adding another
REPL seems fine.
Test Plan: Ran all tests
Reviewers: phillco, #mercurial
Reviewed By: phillco
Differential Revision: https://phabricator.intern.facebook.com/D6741283
Signature: 6741283:1516225662:ddc19a663e7ecef2a1fdaa5041f308dc838a8471
Summary:
`lfs` is the better large file solution. `largefiles` is rarely used, and
its implementation is less clean. So let's remove it.
Test Plan:
Ran all tests. A subrepo test was removed instead of cleaned up since the
longer term plan is to also drop subrepo support.
Reviewers: phillco, #mercurial
Reviewed By: phillco
Differential Revision: https://phabricator.intern.facebook.com/D6740361
Signature: 6740361:1516225594:555e3803571ad05e0434021897a2823ac99347ae
Summary:
Since we moved some files, these failures changed.
Depends on D6719894
Test Plan: - ./run-tests, see passing
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.intern.facebook.com/D6719911
Summary:
This looks most like a dirty hack in this stack, especially the largest file.
Unfortunately, on my some number of runs it looked like the output is not really
consistent: some lines were `verifying ...` and some `cannot verify ...` inconsistently
over the runs.
Hovewer, given that the `hgsubversion` test suite simply did not care about what
tests printed, I think this is acceptable.
Depends on D6719894
Test Plan: - `./run-tests.py`, see tests passing
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.intern.facebook.com/D6719906
Summary:
Here we make imports in `hgsubversion` tests work again.
This consists of two main parts:
1. tests were importing each other as python modules. Now that they have `-` in
their names, it is impossible. However, we can utilize some tricks to work
around this (`imp.load_source`)
2. tests where doing some weird location assumptions, we clean that up
Depends on D6719890
Test Plan: - `./run-tests -l test-hgsubversion-*`, see non-import-exception failures
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.intern.facebook.com/D6719894
Summary:
This migration allows `./run-tests.py` to run `hgsubversion` tests. Since hgsubversion
tests are actually python unittests, we don't care about their output at all,
they fail differently. But the behavior of the test suite require us to match
whatever the tests prints. We do this later in the stack.
Depends on D6719886
Test Plan: - check that tests are runnable at least
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.intern.facebook.com/D6719890
Summary:
This is in line with our general spirit of renaming things into test-extname-smth.
Depends on D6719883
Test Plan: - test fixes and runs follow in the stack
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.intern.facebook.com/D6719886
Summary:
Move tests to where we are used to them.
Note that I don't move comprehensive tests to the `tests` directory, since
I think that having them not run when `./run-tests.py` is run without arguments
may be a useful thing. In general, we may adopt this concept for the core as well.
If we decide we do want to move them, it's very easy to do.
Depends on D6719879
Test Plan: - fixups and test runs follow in the stack
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.intern.facebook.com/D6719883
Summary:
Rename hgsubversion tests to match our tests name patterns.
Depends on D6719877
Test Plan: - just a rename, following diffs do fixups
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.intern.facebook.com/D6719879
Summary:
To incorporate hgsubversion tests into our test suite, we need to turn them into
silentrunner tests, which run python unittests, but do check for the output to match
some expected file. hgsubversion tests were not written with checking output in mind
(and even if they were, .t tests need globbing/regex support as well). So, this
simple support for (re) suffixes on .py.out files allow us to match unstable output.
Test Plan:
- perform some manual experiments
- following diffs in the stack make use of it
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.intern.facebook.com/D6719877
There's no need to do this and not doing so speeds up IMM tremendously when the sparse profile had to be adjusted.
(This is the grafted version from the fb-hgext repo)
Test Plan:
I ran an IMM before and after this change. Both succeeded but the later version was
much faster.
Differential Revision: https://phab.mercurial-scm.org/D1805