Summary:
pull in the following revisions from the copy of this code
we had under fbsource/scm/hgext:
2f7e4f11e002cf33e4878df77d6a0472adf31245 D6099388
e2a5a711e36c7392129b8753bea37c89a5d73a9c D6099754
77b975dcde28cd7c3d4ae2302bddb625682d1994 D6099753
Reviewed By: simpkins
Differential Revision: D6792967
fbshipit-source-id: e91a74329cddaf322172d3c7d9e1a05b3b6cba02
Summary:
D6698242 removes legacy lfs config options. This diff migrates it to the new
`lfs.url` config.
Reviewed By: singhsrb
Differential Revision: D6812621
fbshipit-source-id: 0a3196a8f08e11ca49fa053d57c3621b022657a2
Summary:
Many processes may be reading and writing from this cache at once, so
let's be sure to use atomic temp.
Reviewed By: quark-zju
Differential Revision: D6811428
fbshipit-source-id: 5c6c157a60e294ab77cc5cb735c5705b7cddff87
Summary:
unbundle should use raw revisions and keep flags as-is,
instead of using high-level `filelog.add` API.
Reviewed By: ryanmce
Differential Revision: D6806031
fbshipit-source-id: 3e1819a91ee869ac8023eefb3f3aa7542f770539
Summary:
We're seeing high load on the server when many clients are fetching treemanifest
entries. A lot of this stems from the cost of opening revlogs. Let's introduce a
simple on-disk cache that let's us avoid opening revlogs as much as possible.
Reviewed By: quark-zju
Differential Revision: D6797698
fbshipit-source-id: c131aa57be333dcb2e4453c6a1f9f4e24532a7ee
Summary:
The import was using the old format here. Let's use the requireext
check instead to be more robust.
Reviewed By: quark-zju
Differential Revision: D6803848
fbshipit-source-id: cb8474245414c946a1ab6cc6c3cec18cd831de0d
Summary:
The require-ext script tried to test the common extension module names
but failed to use the loop variable. This fixes that.
Reviewed By: quark-zju
Differential Revision: D6803708
fbshipit-source-id: 91a32bc2b63ea9ec0652342424f33c87b0898b70
Summary:
This was also using O(repo) file queries. Let's scope them down.
Performance here depends on us shipping a new rpm to users, so let's disable
this test until we do that.
Reviewed By: quark-zju
Differential Revision: D6803495
fbshipit-source-id: e49f00d1a606f0c0ceae6c1e8556f0137186da0a
Summary:
Suggesting disabled extensions uses extensions.loadpath, which is no
longer supported for core extensions. Since this test is just testing that the
extension can be disabled, let's not worry about the exact output.
Reviewed By: phillco
Differential Revision: D6802719
fbshipit-source-id: 2a602e086f4809676ef8dd36ffc30f021b3186fc
Summary:
This test tried to verify that the perf code could still handle
Mercurial version 1.2. Since we don't have tags in our repository, and since I
didn't want to hard code a hash since it wouldn't work in opensource land, let's
just drop the historical compatibility checking.
Reviewed By: quark-zju
Differential Revision: D6802362
fbshipit-source-id: 76f8d2b112784ce641457ff651832cb1b6c93540
Summary:
check-execute was failing because the filesets are too slow (about 45+s
each). This fixes the performance by optimizing some internal fileset logic, and
by fixing a fileset to be scoped to the current working directory instead of the
whole repo.
Unfortunately the fileset implementation optimization needs to be deployed
before the test can benefit from it (since the test runs the system hg), so we
need to leave the test disabled until the fix rolls out.
Reviewed By: quark-zju
Differential Revision: D6802078
fbshipit-source-id: 26767c989e15b6d0ae5f5d9560309dafa5c380ff
Summary:
Just drops the hg10 requirement since version numbers work differently
in our repo. These still don't run unless you have the appropriate jshint and
pylint programs installed (which I don't).
Reviewed By: quark-zju
Differential Revision: D6802387
fbshipit-source-id: bdfda8257c358b3a6db839aa130b555124c8ef04
Summary:
This was timing out when run in a large repo. This patch fixes it to be
faster.
Reviewed By: singhsrb
Differential Revision: D6800750
fbshipit-source-id: 7021ab17b30727cafa4fc0654a7409c43793b3e9
Summary: It's still too noisy. Let's disable it for now before London wakes up. We can add rules back in one-by-one as we fixup existing code.
Reviewed By: DurhamG
Differential Revision: D6794987
fbshipit-source-id: f7c95d660c5af4373b6c10545eb85cb5c63f282e
Summary: Pyflakes complains it's not used, but it's actually a reference to the native class. Make that obvious.
Reviewed By: quark-zju
Differential Revision: D6799935
fbshipit-source-id: 16060839385ab52d53e43b9b4b202b5771d01dc2
Summary: These files were removed and one was added, so add to the expected test output.
Reviewed By: quark-zju
Differential Revision: D6799790
fbshipit-source-id: 514cb095cb727f465aa82b06465a49f17f0e0eb2
Summary:
Port of D6798134 to fbsource. It eliminates module-import failures as well as errors like this:
```
mercurial.error.ForeignImportError: hgext.extlib.treedirstate: /home/phillco/.local/lib/python2.7/site-packages/hgext/extlib/treedirstate.so lives outside /..../hg
```
....that block other tests, like test-help.t
(Note: this ignores all push blocking failures!)
Reviewed By: quark-zju
Differential Revision: D6799259
fbshipit-source-id: b77d1b565dbf52165e0847002be498648658e064
Summary:
This test wasn't running because it had a hg10 check. Let's drop that
and fix the one failure.
Differential Revision: D6798754
fbshipit-source-id: 9d1f1f8b58ff14cba8228f9dc4c83ce21cab6c48
Summary:
This needs to scope down the hg locate to just files in the current
main hg directory.
Differential Revision: D6798373
fbshipit-source-id: a31d66b05ba40439657afa4465667a72b5728123
Summary:
The last diff lost most of its content after v2 was submitted. Resend.
(Note: this ignores all push blocking failures!)
Reviewed By: quark-zju
Differential Revision: D6795055
fbshipit-source-id: ed5f6d5eba9f8cfd505ed4ba1724110414b685f8
Summary:
`hg version`, as of the last path, currently prints:
```
Mercurial Distributed SCM (version 20180123_174746_5cb750b72031)
Facebook Mercurial release: UNKNOWN-RELEASE
```
There's no need for us to print the second line now that the first represents the internal version ID.
(Note: this ignores all push blocking failures!)
Reviewed By: quark-zju
Differential Revision: D6794821
fbshipit-source-id: 499828832a0acb066adc260f852c3a743e41a563
Summary:
./setup.py's logic to pick a version no longer works in fbsource because it only works if `.hg` is in the current
directory. (It set it to 'unknown'.)
We already moved the build logic to a streamlined system of (YYMMDD_HHmmSS_hash), so let's do the same with the actual version that
gets shipped with the release.
(Note: this ignores all push blocking failures!)
Reviewed By: quark-zju
Differential Revision: D6794773
fbshipit-source-id: 5de44b9a3541babddeff06e096b5b1faa8733e47
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:
flake8 looks very useful, though not all of its default rules apply to the Mercurial codebase.
I've added the start of a config files so we can keep it but start to disable or tweak rules that don't fit the existing code
style. I added a few to get started.
Reviewed By: DurhamG
Differential Revision: D6791079
fbshipit-source-id: c98662f57d21ed8e4f5def465b3c92765dd69f92
Summary:
When used with hggit, simplecache would treat all hggit overlayctxs as having the `nullid` node. This is used in the cache key for the result of `status()`; this caused the return value of all hggit's changectxs' `status()` to be intermingled.
There are arguably two issues here:
- hggit's `overlaychangectx` simply implemented `node()` and didn't set a `_node` like changectx does. Changectx refers to this property internally (and other external callers might do so too) so we should probably set it.
- simplecache was reading the `changectx._node` property instead of the more public `changectx.node()`. This returned `nullid` because of the above.
Either change would fix it but I sent both to be safe. I look forward to tightening the context class interfaces in the future.
(Note: this ignores all push blocking failures!)
Reviewed By: quark-zju
Differential Revision: D6788335
fbshipit-source-id: eb4b3cebc1b6ee6011405cdb7d702cdf5cac0904
Summary:
Same fix as D6788335, though not blocking anything. Use the public `node()` function
on contexts and exclude None, nullid, and wdirid from caching.
Reviewed By: DurhamG
Differential Revision: D6790845
fbshipit-source-id: 4ccdc6889c993bb1a8379d50ecc92cb2aa03513d
Summary:
This fixes an obvious mistake. It wasn't noticed because it's part of the last
"cleanup" before landing the change. And it runs on a big repo which hides
the problem.
On smaller repos, changelog is inlined and clindex won't be used because the
Rust index does not support inlined revlogs. `repo.updatecaches()` will raise
`AttributeError` since the original `self.changelog.index` object does not have
`updatecaches()`. In that case, it's obvious that we should not skip the
original `repo.updatecaches()` call. The same applies to `repo.destorying()`.
Since after the fix, tests are passing. Let's enable clindex by default. As
explained above, clindex is not actually well exercised because of inlined
revlog. We should probably special case changelog to be always non-inlined.
That's probably a separate diff.
Reviewed By: phillco
Differential Revision: D6767200
fbshipit-source-id: c8432eec6c02c06c4d49c13df150e1b25bbaa1aa
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: We probably want this script to work going forward. A lot of cleanup is needed, but at least now it produces a working binary.
Differential Revision: D6770776
fbshipit-source-id: dc2d44bd66e16c5bee53aadf262d6d3dee2fea96
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