Summary:
When `--with-hg` and `-l` are both provided. `-l` will override
`--with-hg`, which is unfriendly. Let's do the reverse.
Reviewed By: DurhamG
Differential Revision: D6879863
fbshipit-source-id: 00ea9805431cc7afa6dd521cfb9059c898ed6d1f
Summary:
`test-check-help.t` could run `hg help` and that command shouldn't be affected
by the current repo requirement. So let's add `--cwd /`.
`helpers-testrepo.sh` uses `-R path` and that only works if path is the repo
root. It's not guarnateed now. So let's use `--cwd` instead.
Reviewed By: DurhamG
Differential Revision: D6879867
fbshipit-source-id: 0b40ab71acf7eb215834ce323fc16156da9afcd3
Summary:
`lz4.block` needs to be imported explicitly before being able to
use `lz4.block.compress`.
We didn't notice this because we're using an old version of
`python-lz4`.
Reviewed By: DurhamG
Differential Revision: D6879877
fbshipit-source-id: 37e8fdc00386bef3733753f925ad308f42e5a740
Summary: This should be removed with D6865042.
Reviewed By: phillco
Differential Revision: D6879861
fbshipit-source-id: 960a9ab643f63d6d4a01dfb0ab7af77616cf9ea2
Summary:
When building a changegroup, sometimes we need to access the list of
files changed by each commit. To do so we need to inspect the manifest.
Previously this would end up downloading each tree one-by-one, producing a bunch
of pack files. With this patch we now do one bulk download at the very
beginning.
Reviewed By: quark-zju
Differential Revision: D6873076
fbshipit-source-id: b916c15efca0770129340f798d3e7b165da6aec9
Summary:
A future diff will add tree prefetching during changegroup creation. This
requires access to the tree prefetch function from the shallowbundle class.
let's move the prefetch functions onto the repo object in preparation for that.
Reviewed By: quark-zju
Differential Revision: D6873055
fbshipit-source-id: 18de0ee0f6ab566587509f9e23ebb2e5779ed1c8
Summary:
Now they are unnecessary since `run-tests.py` will set up `PYTONPATH`
correctly.
Differential Revision: D6865042
fbshipit-source-id: ca95314f725968e14349a9d916434aa832c596f9
Summary:
`hg rebase -i` only works if the source revision is ancestor of the working
directory parent. This updates the code to fail with an error message in this
case instead of rebasing nothing and reporting success.
Note that attempting to change the revset calculation to use `src::` instead
of `src::.` doesn't help fix anything--the histedit code simply rejects the
histedit operation when it finds commits that are not ancestors of the working
directory.
Reviewed By: quark-zju
Differential Revision: D6853548
fbshipit-source-id: 14600f31a5f4ca43c89a81e7b522656b65a056dc
Summary: test-p4fastimport-import-badsymlink.t is failing the regex match P58977427, and this fixes it.
Differential Revision: D6836164
fbshipit-source-id: df43a9e5e30a2745a5dbb36bc6cc07ab81179525
Summary: backout: use only first line of original commit message (title) for backout default message.
Reviewed By: phillco
Differential Revision: D6846109
fbshipit-source-id: 68efbff9db698599a12cef45de7ab4af96cf184f
Summary:
Improve UX for short hash infinitepush feature
I would like to provide some suggestions in case there are several with the same prefix,
so we can provide better user experience.
Reviewed By: markbt
Differential Revision: D6845233
fbshipit-source-id: 4868c1dc599f60e4ac495b71a4aed2d57c36ffa4
Summary:
D6827925 deletes drawdag.py from the tests directory; because the
tests in that revision were run on a repo with .pyc files left behind, the test
failure never happened. Move the test to the new location
Differential Revision: D6845181
fbshipit-source-id: 33c2836d81f66c9cc2a8e82a78b2d6835278a2ac
Summary:
This is a resend of https://phab.mercurial-scm.org/D1430, without breaking
Windows.
I encountered "too many opened files" problem due to treemanifest packs on my
laptop. This patch seems to be the easiest solution without side effects. Other
choices are deleting files (seem like an non-ideal workaround), forcing a
repack (could be slow), and rewriting using Rust (could take too long).
The root cause is Python's `mmap` implementation has to keep a fd internally
to support `mmapobj.resize` API. We only need read-only operation on the
mmap object so the fd is unnecessary. Re-implement a minimal mmap interface
for this purpose.
Reviewed By: DurhamG
Differential Revision: D6835890
fbshipit-source-id: 74c429e957cb8677682604eb02fc38b5b8d13ef7
Summary:
It seems chg might cause troubles like `--bundle-repo` becomes an unknown flag,
if run with other tests. So let's run the tests without chg.
Also avoid using subshells so `exit 80` (in `setup*` shell functions) would correctly
skip the test if `mysql-connector` is not installed.
Reviewed By: singhsrb
Differential Revision: D6841356
fbshipit-source-id: 72d70b8bcc1eac732a2fd89acd9865a8b23be074
Summary:
When pushing a treeonly commit to a tree+flat hybrid server, the server
needs to execute the hooks in treeonly mode so we never try to access the flat
manifests. Previously we did this for shell hooks by setting some environment
variables, but we didn't do it for python hooks that ran in process.
This diff makes the python hooks run against a bundle repo that is instantiated
in treeonly mode. No changes to any hooks are required, as the repo object they
are given is already in the correct mode.
Reviewed By: quark-zju
Differential Revision: D6840971
fbshipit-source-id: 9fcb97d972076911b35bccf3f79b60972bcafc33
Summary:
Since we have `debugbuilddag` as a builtin command, and `drawdag` is
pretty useful for writing clean test cases. Let's inline it. This would
simplify many tests since `drawdag=..." is no longer needed.
Reviewed By: DurhamG
Differential Revision: D6827925
fbshipit-source-id: b749f57fd5c55b2cb000dd2da2c2f9bc2386a519
Summary:
The last attempt did not fix the flakyness. Let's just allow both
results for now.
Reviewed By: quark-zju
Differential Revision: D6839543
fbshipit-source-id: 0d66ee2bbb38aaed67ee2c890c024b3e8eb82a95
Summary:
A recent change added "from __future__ import unicode_literals" to a
few files, this changes the way strings are interpreted so we need to update
them to escape backslashes, otherwise they can be interpreted as unicode
characters and sometimes be invalid.
Reviewed By: quark-zju
Differential Revision: D6838181
fbshipit-source-id: 42fed1edafbb988342f482c3a63b5b235aba7390
Summary:
The remotefilelog-local test was notorious for being flaky. I was able
to reproduce the issue pretty consistently for a bit, and this change appears to
have made the problem go away. I can't promise it will work, but it seems to
have helped.
Reviewed By: quark-zju
Differential Revision: D6838177
fbshipit-source-id: d0ac0171fa2a93e28ed4afcabb5b15b5ee5e7d83
Summary:
[infinitepush] Implement support for short hashes
Also, fix test that was broken and lint errors
Reviewed By: StanislavGlebik
Differential Revision: D6814967
fbshipit-source-id: fef1ae79ef85ebf84aa88cd99367946256049192
Summary: The time column was missing in the bookmark test table
Reviewed By: StanislavGlebik
Differential Revision: D6819122
fbshipit-source-id: c0b4ede651ba5c598f0384580942cfb727b5fe61
Summary:
`build_rpm.py` has a /usr/bin/env shbang so it shouldn't be a failure here.
Although, it's had that shebang since 1/23/18.
Reviewed By: quark-zju
Differential Revision: D6825992
fbshipit-source-id: bf7ff3d61338384d8c6e26a93c71f4361687f1f2
Summary:
If `rebase.experimental.inmemory` was enabled, but you ended up merging on-disk (e.g. you rebased the working copy parent), and you got merge conflicts, and didn't immediately solve them, hg would discard any work you did and restart the rebase unnecessarily.
The bug here is basically that `rbsrt.inmemory` field can be set to False later, because we make further calculations once we define the `rebaseset`. In that case `InterventionRequired` will get raised if the user didn't solve conflicts, but we'll catch it, thinking something went wrong "in-memory", and abort/rerun the rebase. I was too hasty in adding the "catch all exceptions and retry" block.
I solved this two ways -- first, move the rbsrt definition here and explicitly check the state in the Exception catch. Second, add an explicit catch for InterventionRequired and explain why with a comment.
Further refactoring of the rebase code will help here, I think, so we can consolidate all of this logic.
Reviewed By: DurhamG
Differential Revision: D6817683
fbshipit-source-id: eb8baba86ec0deb59a1e0b1cf9ffb02f056ecd92
Summary:
smartlog, among other places, would benefit from being able to
strictly limit the size of text output to the terminal. Provide two functions:
one truncates long lines in a filled block, the other limits the number of
lines of output. Both can optionally add a truncation marker.
Reviewed By: markbt
Differential Revision: D6819153
fbshipit-source-id: d95b654f4a6fef49ad4840f26ef74a18c370bdd8
Summary:
Add a new `-d` option to `hg absorb`, which includes in the `-p` output the first 50
characters of the first line of the commit description for any commit that will
be absorbed into.
The width is configurable through `absorb.maxdescwidth`.
Reviewed By: ryanmce
Differential Revision: D6819341
fbshipit-source-id: 1a007aa5c15c047563b602559b338e5548bf1989
Summary:
There are a couple of ways that dirstate and fsmonitor interact with
treedirstate that are sub-optimal.
When iterating over all files in the dirstate map, use the iterator of keys
(`__iter__` rather than `iteritems`) to hit the treedirstate fastpath that
doesn't build the dirstate tuples.
Use `__getitem__` and catch the `KeyError` rather than `__contains__` followed
by `__getitem__`, as the latter involves two look-ups in the tree.
Skip the indirect call to `hastrackedfile` and `hasremovedfile` as these add
noticable overhead when called many times.
Also fix up the `test-check-code` failure for treedirstate.
Reviewed By: ryanmce
Differential Revision: D6818952
fbshipit-source-id: d49907c282a1b97c66a3d24257bdf54800d7da70
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:
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: 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:
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
Summary: Fixing a bug that causes a fatal crash when a user attempts to delete a bookmark by inputting it's name twice, for example:
# hg bookmark --delete name name
Test Plan: The following test has been added in the test/test-bookmarks.t file
https://pxl.cl/bmTf
to test the new functionality:
~~~
kosullivan-mbp:hg-crew kosullivan$ hg diff tests/test-bookmarks.t
diff --git a/tests/test-bookmarks.t b/tests/test-bookmarks.t
--- a/tests/test-bookmarks.t
+++ b/tests/test-bookmarks.t
@@ -288,6 +288,10 @@
abort: bookmark 'A' does not exist
[255]
+ensure bookmark names are deduplicated before deleting
+ $ hg book delete-me
+ $ hg book -d delete-me delete-me
+
bookmark name with spaces should be stripped
$ hg bookmark ' x y '
~~~
Reviewers: rmcelroy,rafeca
Subscribers: suiting
Tags: python,bootcamp,source_control
Tasks: 22525999
Differential Revision: https://phabricator.intern.facebook.com/D6711774
Summary:
Our new build process is slow because of all the rust and everything. I've seen
test-hghave.t time out a couple of times already.
Test Plan:
- `./run-tests.py -l test-hghave.t` - pass
- `./run-tests.py test-hghave.t` - pass
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.intern.facebook.com/D6726709
Summary:
The initial value of lastdestnode should be the commit onto which the rebase is
happening.
It should be updated whenever a new commit is added for which the p1 parent is
the old last dest node.
Test Plan: Run the new test, and show it now works.
Reviewers: durham, rmcelroy, #mercurial
Reviewed By: rmcelroy
Subscribers: mitrandir
Differential Revision: https://phabricator.intern.facebook.com/D6709108
Signature: 6709108:1515760332:32bef9892792c7c94117b8fe14364937d98ebbac
Summary:
If pushrebase is asked to rebase a commit where the p2-parent is the route to
the commit onto which the rebase is being made, then it is supposed to flip the
parents. This is what ensures that the changes from the server-only commits
are not lost.
This doesn't work. In this test, the "other" file, created on the server, is
lost in the final merged commit.
Test Plan: Added a test which demonstrates a failure.
Reviewers: quark, #mercurial
Reviewed By: quark
Subscribers: quark
Differential Revision: https://phabricator.intern.facebook.com/D6709096
Signature: 6709096:1515794007:0908765c24b18a7dcaf3672953e816095b0acf68
Summary:
Demonstrate the full power of this batte station with the first extension to be default-enabled, `githelp.py`. This also lets us write a test for `DEFAULT_EXTENSIONS`
(`test-extensions-default.t`)
All other test changes are actual fallout from enabling the githelp extension.
Test Plan: Added a test.
Differential Revision: https://phabricator.intern.facebook.com/D6717098
Summary: When running hg ssl, if the .arcrc file is not proper JSON
(e.g., has a trailing comma), json.loads raises an exception that
was not being caught and lead to a stacktrace.
Test Plan: Locally run hg ssl with a bag .arcrc and the stack trace was gone.
Also write a test in test-fb-hgext-phabstatus.t
Reviewers: simonfar
Subscribers: luizmramos
Tasks: T24993088
Tags:
Summary:
The 'svnadmin' version on the system can be different from the one
expected the tests which leads to issues. Using the same logic as in commit
'39750dc6a11476d1a967311bef21f205f306f67d'.
Test Plan: cd tests/hgsubversion && ./run.py test_svnwrap.py
Reviewers: durham, #mercurial, #sourcecontrol
Reviewed By: durham
Differential Revision: https://phabricator.intern.facebook.com/D6708715
Signature: 6708715:1515718219:178b69a72193057214586d1618c6dc8846bf2f52
Summary: Some files had missing imports; fix them.
Test Plan: Test suite now has fewer failures.
Reviewers: singhsrb, #sourcecontrol
Reviewed By: singhsrb
Subscribers: singhsrb
Differential Revision: https://phabricator.intern.facebook.com/D6701257
Signature: 6701257:1515648742:cf402234bbe67b08138f942ead8240a596298b7e
Summary:
Moving stuff into fb/packaging broke a few tests since they're
trying to apply the Mercurial linters on scripts that don't conform.
Let's exclude these directorites for now.
Test Plan: This fixes a test.
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.intern.facebook.com/D6701215
Summary: D6700784 encoded the the incorrect path. This commit addresses that.
Test Plan: Ran all the tests
Reviewers: singhsrb, #mercurial, #sourcecontrol
Reviewed By: singhsrb
Differential Revision: https://phabricator.intern.facebook.com/D6700869
Signature: 6700869:1515643366:9de76782a770b7ddc42b09bd06d07038f25c20b7
Summary:
D6700605 exposed new code to tests which resulted in some issues. This
commit addresses those test failures.
Test Plan: Ran all the tests.
Reviewers: phillco, #mercurial, #sourcecontrol
Reviewed By: phillco
Differential Revision: https://phabricator.intern.facebook.com/D6700784
Signature: 6700784:1515640770:034c3ccd602abc0b546d3936a31418803c17247b
Summary:
We'd like to have a lightweight, portable tool to upload and download certain
binaries without checking them in.
This diff makes LFS do that. It's intended to be used for Rust vendored assets,
Cython and other dependencies' tarballs, and a prebuilt Python using MSVC on
Windows.
Comparing with dewey, this would unblock our Windows build.
Test Plan: Added a test.
Reviewers: durham, #mercurial
Reviewed By: durham
Subscribers: durham
Differential Revision: https://phabricator.intern.facebook.com/D6699099
Signature: 6699099:1515633647:2fb90c8ecb4395b0b12e8e8baf1c5ee7fa4d84b0
Summary:
D5617283 requires test-lfs-test-server.t to be able to resolve an internal
domain and also requires some certain implementation detail at the endpoint
(ex. set error.code).
That will not work outside internal network. Let's change the test to just
use `lfs-test-server`. Note the logic also needs to be changed sicne
lfs-test-server does not set error.code to 404 but just removes "download"
from "actions".
Test Plan: Ran all tests.
Reviewers: durham, davidsp, #mercurial
Reviewed By: durham
Differential Revision: https://phabricator.intern.facebook.com/D6698170
Signature: 6698170:1515633241:2496a4c02de6916a8f74ac67c4628e6e3a049b1b
Summary: Tests should not refer to hgext3rd directly.
Test Plan: Ran tests.
Reviewers: durham, #mercurial
Reviewed By: durham
Subscribers: durham
Differential Revision: https://phabricator.intern.facebook.com/D6698786
Signature: 6698786:1515632845:9a63120fb13eab17f268facd2be9b374506f665c
Summary: This avoids issues where a wrong (outside the repo) extension was used.
Test Plan: Ran all tests
Reviewers: durham, #mercurial
Reviewed By: durham
Subscribers: durham
Differential Revision: https://phabricator.intern.facebook.com/D6690534
Signature: 6690534:1515632034:1353c9272650cf925dd299d252592afd52970e98
Summary:
A test was failing because the template it was using contained colors. Let's
just set HGPLAIN for all hgsubversion tests.
This also changes the module import checker to not just check for modules that
start with hgsubversion, since now we have modules like hgext.hgsubversion.
Test Plan: Ran the tests
Reviewers: singhsrb, #mercurial
Reviewed By: singhsrb
Differential Revision: https://phabricator.intern.facebook.com/D6698665
Signature: 6698665:1515628674:68d16f5560575a3623edea9919ec9e610bedd369
Summary:
hgsubversion now exists in hgext.hgsubversion, so the imports need to
be updated everywhere.
Test Plan: Ran the tests
Reviewers: singhsrb, #mercurial
Reviewed By: singhsrb
Differential Revision: https://phabricator.intern.facebook.com/D6698653
Signature: 6698653:1515628610:daad45a0e7566c784a4f5c8d7e6e5fed8976b92b
Summary:
This test discovers what python files are available and ensures help
text is available. Since hgsubversion is now in the repo, we need to enable it
so `hg help subversion` works.
Test Plan: Ran the tests
Reviewers: singhsrb, #mercurial
Reviewed By: singhsrb
Differential Revision: https://phabricator.intern.facebook.com/D6698628
Signature: 6698628:1515629061:5cc01e14e6884010e76608f51dbc675d79374568
Summary: Fix up the paths to make tests run with the new directory locations.
Test Plan: Tests are made to pass in a later diff.
Reviewers: quark, #mercurial
Reviewed By: quark
Subscribers: quark
Differential Revision: https://phabricator.intern.facebook.com/D6698550
Signature: 6698550:1515628538:010887d98cb473dfbc46ae26e183ebdb283902f8
Test Plan: Tests are made to pass in later commits.
Reviewers: quark, #mercurial
Reviewed By: quark
Differential Revision: https://phabricator.intern.facebook.com/D6698523
Signature: 6698523:1515628418:39f509c8422cdc223f5e84ae18dfd7cfe9344b2e
Summary:
Moves the moreversion extension to hgext/ and updates the core setup.py
to process it. Eventually we should get rid of this and store the version number
as the normal Mercurial number, but that can happen later.
Test Plan:
make local && ./hg version
Mercurial Distributed SCM (version 4.4.2+8922-aa235b4cbeac+20180110)
Facebook Mercurial release: UNKNOWN-RELEASE
Reviewers: phillco, #mercurial
Reviewed By: phillco
Differential Revision: https://phabricator.intern.facebook.com/D6696199
Signature: 6696199:1515621476:7835f9110ec143737c488faf49cf547eee8f918e
Summary: Makes more sense to have this structure after D6691821.
Test Plan: Ran all the tests.
Reviewers: quark, #mercurial, #sourcecontrol
Reviewed By: quark
Differential Revision: https://phabricator.intern.facebook.com/D6694171
Signature: 6694171:1515609818:1142419346e3458db7674b1b69036d88e82a1903
Summary: Update import statements and code to match core linters.
Test Plan:
`run-tests.py -j8`
Source these versions of phabdiff.py, arcdiff.py, and phabstatus.py in my hgrc. Run hg st, diff, ssl and observe no crashes.
Reviewers: durham, rmcelroy, phillco, #mercurial
Reviewed By: rmcelroy
Subscribers: rmcelroy, quark, awestern
Differential Revision: https://phabricator.intern.facebook.com/D6680961
Signature: 6680961:1515578477:ea5f1591e390f6ca8a94f652daeb1db9de819fea
Summary:
Now that we moved infinitepush to hgext in D6691670, we can also move
the tests. The sql related tests need special attention because of the db
connection and mysql connector.
Test Plan:
Ran all the tests. Removed the mysql connector and checked that the
test is skipped. Also checked that the test is skipped if the db connection
details are not specified.
Reviewers: ikostia, singhsrb, #mercurial, #sourcecontrol
Reviewed By: ikostia
Subscribers: rmcelroy
Differential Revision: https://phabricator.intern.facebook.com/D6691821
Signature: 6691821:1515600428:279dc4796c9be721c5fa81ac2dcd6e065ac30f18
Summary:
Now that we moved infinitepush to hgext in D6691670, we can also move
the tests.
Test Plan: Ran all the tests.
Reviewers: stash, #mercurial, #sourcecontrol
Reviewed By: stash
Differential Revision: https://phabricator.intern.facebook.com/D6691848
Signature: 6691848:1515573470:628d092f14cf3ae21c036883243c80eb3b01aa72
Summary:
We changed the location of infinitepush which exposed it to the
additional test that failed. This commit fixes infinitepush to address that
test.
Test Plan: Ran all the tests.
Reviewers: rmcelroy, #mercurial, #sourcecontrol
Reviewed By: rmcelroy
Subscribers: rmcelroy
Differential Revision: https://phabricator.intern.facebook.com/D6691723
Signature: 6691723:1515578651:230bafc88354ecf10a31487967b43ab46a5a1279
Summary:
We changed the location of infinitepush which exposed it to the
additional test that failed. This commit fixes infinitepush to address that
test.
Test Plan: Ran all the tests.
Reviewers: rmcelroy, #mercurial, #sourcecontrol
Reviewed By: rmcelroy
Differential Revision: https://phabricator.intern.facebook.com/D6691691
Signature: 6691691:1515578616:1ab451468835cc67a35f1d4d6e56a71f48db47e1
Summary:
This is part of the overall plan to move extensions from fb-hgext to
hgext. Follow up commits will address some of the test issues and move the
infinitepush related tests out of fb-hgext to hgext.
Test Plan: Ran all the tests.
Reviewers: rmcelroy, #mercurial, #sourcecontrol
Reviewed By: rmcelroy
Differential Revision: https://phabricator.intern.facebook.com/D6691670
Signature: 6691670:1515578586:8d7836aebb474856559c6dbe6fe2f572c8bdf7f1
Summary:
Rust dependencies are vendored in by downloading a package containing all Rust
dependencies.
The package can be updated using the new `vendorcrates.py` script.
Test Plan: Build using the vendored packages.
Reviewers: quark, #mercurial
Reviewed By: quark
Differential Revision: https://phabricator.intern.facebook.com/D6689642
Tasks: T24908724
Signature: 6689642:1515548647:8051ec3dadd98873f0312bb67978846ba029b558
Summary:
Reorder the imports to make the module checker happy.
The module checker should be aware of Cython module paths. Do it manually.
Test Plan: Run `test-check-module-imports.t`
Reviewers: durham, #mercurial
Reviewed By: durham
Differential Revision: https://phabricator.intern.facebook.com/D6688384
Signature: 6688384:1515540420:bec02696b24c12cb4fa2595fd235fc8f3246b2a2
Summary: The path was not modified in the test which results in test failure.
Test Plan: Ran test-check-module-imports.t
Reviewers: durham, #mercurial, #sourcecontrol
Reviewed By: durham
Differential Revision: https://phabricator.intern.facebook.com/D6688247
Signature: 6688247:1515539001:ac926dab6d8bf9dbb8cf6738f499a6c84c85fad2
Summary: The path was no modified in the test which results in test failure.
Test Plan: Ran test-check-module-imports.t
Reviewers: durham, #mercurial, #sourcecontrol
Reviewed By: durham
Differential Revision: https://phabricator.intern.facebook.com/D6688188
Signature: 6688188:1515538788:d19857787c0b4abada9caa2710f0f64b3a70f659
Summary: Now that D6685044 moved fastmanifest, we can also move the tests. Note
that test-fb-hgext-fastmanifest.t was moved seprately by Durham.
Test Plan: Ran all the tests.
Reviewers: quark, #mercurial, #sourcecontrol
Reviewed By: quark
Subscribers: durham, quark
Differential Revision: https://phabricator.intern.facebook.com/D6686584
Signature: 6686584:1515531785:3a9fa022f443faed6f3110eeef22d8ea72fcee3f
Summary:
Previously there is a race condition because things happen in this order:
1. Check shouldStop
2. If shouldStop is false, print the diff
3. Call fail() -> set shouldStop
The check and set should really happen in a same critical section.
This patch adds a lock to address the issue.
The patch was also sent as https://phab.mercurial-scm.org/D1830
Test Plan: Run `run-tests.py -l test-run-tests.t` many times and it no longer fails.
Reviewers: durham, #mercurial
Reviewed By: durham
Subscribers: durham
Differential Revision: https://phabricator.intern.facebook.com/D6680300
Signature: 6680300:1515524998:260c3e198330e7e6c94dcb6cf155f14a055b760a
Summary:
clindex is an hg extension, so moved to `hgext`.
linelog is not an hg extension, but is only used by hg extensions, not
`mercurial/`, so moved to `hgext/extlib`.
Test Plan: `make local` and `run-tests.py` without `-l` and with an empty `PYTHONPATH`.
Reviewers: durham, #mercurial
Reviewed By: durham
Subscribers: fried
Differential Revision: https://phabricator.intern.facebook.com/D6685080
Signature: 6685080:1515525106:88ebb275d0cac041911f243a3e82b82482b6cd34