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:
Previously it's `:. & follow(FILE)` and there is a Python loop iterating
`:.`. This patch makes it `follow(FILE) & :.`.
In the common case, `_logrevs` returns a large revset in desc order. So it
makes sense to put it at the right side of `&` operator. The only exception is
when `_logrevs` uses user-specified revset (`-r`), whose order needs to be
respected and size is unknown.
Test Plan:
Ran all tests.
Facebook:
This reduces `hg log FILE` from ~3 seconds to ~0.5 seconds.
```
# Before
% time hg log cmd_util.py --pager=off --config extensions.fastlog=! -T'{oneline}\n'
11e9d4 D5997870 mbolin Use --home-dir to compute the config dir, if specified. 2017-10-06
5041e2 D4888633 simpkins [eden] move eden/fs/cli to eden/cli 2017-04-14
7dc2bd D4760528 simpkins [eden] an "eden debug" CLI command and thrift APIs to support it 2017-04-03
hg log cmd_util.py --pager=off --config extensions.fastlog=! -T='{oneline}\n' 2.88s user 0.09s system 99% cpu 2.975 total
# After
% time hg log cmd_util.py --pager=off --config extensions.fastlog=! -T'{oneline}\n'
7dc2bd D4760528 simpkins [eden] an "eden debug" CLI command and thrift APIs to support it 2017-04-03
5041e2 D4888633 simpkins [eden] move eden/fs/cli to eden/cli 2017-04-14
11e9d4 D5997870 mbolin Use --home-dir to compute the config dir, if specified. 2017-10-06
hg log cmd_util.py --pager=off --config extensions.fastlog=! -T='{oneline}\n' 0.42s user 0.03s system 98% cpu 0.456 total
```
Fastlog is disabled since a network request makes the time less stable.
Logging a single file is answered locally by remotefilelog ancestor handling.
Reviewers: durham, #mercurial
Reviewed By: durham
Subscribers: durham
Differential Revision: https://phabricator.intern.facebook.com/D6735007
Signature: 6735007:1516163080:0d7ddae9f24933d795ba7aaa4461916c7fdd2309
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: This is a quick way to ensure that if IMM goes wrong in a way that isn't conflict related (e.g. an uncaught exception) we restart and log to scuba.
Test Plan: ./run-tests.py
Reviewers: durham, quark, #mercurial
Reviewed By: durham, quark
Differential Revision: https://phabricator.intern.facebook.com/D6734117
Signature: 6734117:1516152432:5620b12579d41dca2ea8f15b08a8007e2f6467fc
Summary:
This if statement is testing whether we ever set any data, not whether the data is truthy.
This can cause a bug where rebasing an empty file can cause IMM to fail and restart.
Test Plan: ./run-tests.py
Reviewers: durham, #mercurial
Reviewed By: durham
Differential Revision: https://phabricator.intern.facebook.com/D6687459
Signature: 6687459:1515535581:c2018237f3ca9daed6a0cb2f5a1475d1dc8e4865
Summary:
Before, we would raise whenever the `usemergedriver` condition was set when merging in-memory,
which equated to "any merge with (cd, dc, or m) actions in a repo with a mergedriver script".
This was done to be as conservative as possible.
However, a better solution is to run the preprocess() script and only raise if any files are
marked to actually be driver-resolved. That way we only restart the merge if we absolutely need
to.
Since some of our preprocess() scripts aren't ready yet, I also added
experimental.inmemory.nomergedriver in a previous change so we can deploy this in a build before the preprocess scripts are good to go.
Test Plan: ./run-tests.py
Reviewers: quark, #sourcecontrol
Reviewed By: quark
Subscribers: durham
Differential Revision: https://phabricator.intern.facebook.com/D6668426
Signature: 6668426:1515185050:a640208454caf053f8213b831d0f8e645ebe682c
Summary:
This gives us an easy way to ensure IMM is disabled automatically if the user configures a
mergedriver script.
Test Plan: run-tests.py
Reviewers: durham, #sourcecontrol
Reviewed By: durham
Subscribers: durham
Differential Revision: https://phabricator.intern.facebook.com/D6668421
Signature: 6668421:1515185587:a190311f1d57a9a604cb609a63ebc296dad11db3
If the user specifies a ui.origbackuppath, we used to always copy the file
there, but if the source file is in memory we must write it instead of copying.
Differential Revision: https://phab.mercurial-scm.org/D1806
Summary: Log whichever paths were driver-resolved but not in experimental.inmemorydisallowedpaths, so we can update experimental.inmemorydisallowedpaths and keep the experience of rebasing with IMM and
mergedriver a pleasant one.
Test Plan: .
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.intern.facebook.com/D6656159
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:
This was leading to 'mercurial.error.ForeignImportError' while running
some tests like 'test-fb-hgext-phabstatus.t' during hgbuild. Thanks @quark for
the fix!
Test Plan:
```python setup.py install --user && cd ~/.local && find -type d -name 'phabricator'```
contains `hgext/extlib/phabricator`
Reviewers: quark, #mercurial, #sourcecontrol
Reviewed By: quark
Subscribers: quark, awestern
Differential Revision: https://phabricator.intern.facebook.com/D6716979
Signature: 6716979:1515801243:77b9681c15617c88a2b2b9e1f1e15ca19c3b0346
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:
Based on in-person discussion in the warroom, we think this is the right path forward to "upstream" certain extensions without actually folding them into the mercurial/ codebase.
Enabling extensions by default achieves most of our goals (testing _everything_ in tests, reducing configuration permutations) without having to pay an up-front cost of fixing all the code today or accepting subpar code in mercurial/.
Test Plan: ./run-tests.py.
Reviewers: quark, #mercurial
Reviewed By: quark
Subscribers: quark
Differential Revision: https://phabricator.intern.facebook.com/D6716674
Signature: 6716674:1515803845:a209ec288341e4de8e79fd3759250e834a3573e3
Summary: Based on feedback to D6687860.
Test Plan: n/a
Reviewers: durham, #mercurial
Reviewed By: durham
Differential Revision: https://phabricator.intern.facebook.com/D6714211
Signature: 6714211:1515788399:386b8f7330f343349234d1f317e5ac0a594142cf
Summary: The text was wrong.
Test Plan: Make sure the new text match the function signature.
Reviewers: mitrandir, #mercurial
Reviewed By: mitrandir
Differential Revision: https://phabricator.intern.facebook.com/D6710509
Signature: 6710509:1515758961:65184b83ddda417c9125c675986093ef52660fbb
Summary:
These import statements are actually broken -- I don't know how they were working before. (Perhaps because `demandimport` tries a few different paths.)
But this makes them work without demandimport.
Test Plan: HGDEMANDIMPORT=disable ./hg st
Reviewers: quark, singhsrb, #mercurial
Reviewed By: singhsrb
Subscribers: quark
Differential Revision: https://phabricator.intern.facebook.com/D6713858
Signature: 6713858:1515787418:23a78b8a439e7d114ead81dc9a136478f98f7e50
Summary: Seems like an oversight
Test Plan: hg status
Reviewers: singhsrb, #mercurial
Reviewed By: singhsrb
Differential Revision: https://phabricator.intern.facebook.com/D6713825
Signature: 6713825:1515786595:2cd62e8f86bac3ab7d5dbf6e7bd59bca05ddc634
Summary:
The vendored crates currently untar to build/build. Now that the build script
chdirs to build/, there's no need to pass that to tarfile.extractall.
Test Plan: `make clean ; make local`
Reviewers: quark, #mercurial
Reviewed By: quark
Differential Revision: https://phabricator.intern.facebook.com/D6713510
Signature: 6713510:1515785178:042124a6592aa04ab1e6748596f6615cd61e8df3