This avoids conflict with the core extension (`hgext/sparse.py`). In
development mode, the `hgext` version takes precedence and people can easily
use the wrong sparse extension.
`sparse.py` is kept for compatibility.
Differential Revision: https://phab.mercurial-scm.org/D1048
Summary:
Enhance check-ext script to be more strict:
- Only one foreign extension is allowed: `remotenames`
- Require explicit path for in-repo extensions to avoid wrong extensions
being tested
This would make the test more predicatable since system extensions
will be less likely to be imported. Explicit path is better than
setting `PYTHONPATH` since `hgext/name.py` could override
`hgext3rd/name.py` regardless of `PYTHONPATH`.
Test Plan: arc unit
Reviewers: phillco, durham, ikostia, #mercurial, stash
Reviewed By: stash
Subscribers: medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5271430
Signature: t1:5271430:1497861776:7dd35ec7c522cd9b26aa0871cb4306b4f1b8993a
Summary: The data was being sent to scuba, but then ignored altogether. Turn this into a single string instead.
Test Plan: arc unit
Reviewers: #sourcecontrol, andrasbelo
Reviewed By: andrasbelo
Subscribers: mjpieters, andrasbelo
Differential Revision: https://phabricator.intern.facebook.com/D4598196
Signature: t1:4598196:1487784582:8952e0e386325d1635029aab2b9d97e9284376ea
Summary:
Previously the noderev cache only covered the branchmap. These days remotenames
and phases are also doing a lot of node->rev look ups, so let's add them to the
noderev cache as well.
Test Plan:
Compared hg book before and after the change. Noticed a significant
perf increase.
Reviewers: #mercurial, ikostia
Reviewed By: ikostia
Subscribers: mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D4487962
Signature: t1:4487962:1485871615:634d95f61e916d81440a0f440010912af5ae6a13
Summary: Log active profiles for any command that uses the repository.
Test Plan: arc unit
Reviewers: #sourcecontrol, mitrandir
Reviewed By: mitrandir
Subscribers: andrasbelo, mitrandir, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D4346795
Signature: t1:4346795:1482251224:a9b3568eeb7e57c61273ce0dc9f4d41abcd2888e
Summary:
SCM_SAMPLING_FILEPATH is set by arcanist, and thus the tests fail when you run
arc unit.
Test Plan: Run arc unit
Reviewers: #sourcecontrol, quark
Reviewed By: quark
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D4342459
Signature: t1:4342459:1481929811:1ac8db74cfd86be7ad35466e6eaf2f7e35ad9140
Summary:
Logging dirstate sizes gives us a way to track sparse profile use; how big a
working copy do people actually have?
The logged info can be directed to Scuba via the sampling extension.
Test Plan: Run on a local test repo with the debugger attached. Goal
Reviewers: #sourcecontrol, quark
Reviewed By: quark
Subscribers: mitrandir, quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D4340367
Signature: t1:4340367:1481920819:d7358e0bdc2cc1422b36266374344e7d2b644ae5
Summary: Make the test pass on OS X with conditionals on the "only works on case-insensitive FS" block and a wider regex for output
Test Plan: Run on devserver and laptop
Reviewers: #sourcecontrol, quark
Reviewed By: quark
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D4074471
Signature: t1:4074471:1477410666:f0fb89060fd7c78e246e0772c4509334090c2d83
Summary:
Be a better citizen under system python path.
Fix all tests issues and change setup.py to use glob pattern to include
all extensions.
Test Plan:
Run tests and `make local`.
Also build and install the package and run `hg sl` in major repos.
Reviewers: #mercurial, ttung, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy, durham, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3534311
Signature: t1:3534311:1468275426:fe122646c8bd6c541e1889e73e9df28f86747ff2
Summary:
Previously, we were calling open directly. Let's go via the vfs to
avoid nasty surprises in the future.
Test Plan:
Exisitng tests.
Also added a test, but that just verifies that the repo.vfs stuff doesn't
mess up the permissions when the umask is correct.
Reviewers: #sourcecontrol, ttung, durham
Reviewed By: durham
Subscribers: durham, mjpieters
Differential Revision: https://phabricator.fb.com/D3126492
Tasks: 10661429
Signature: t1:3126492:1459531801:0931f9b02c544f98651c7630e74283feef426175
Summary: This diff is part of a series to cleanup fb-hgext and make it pass check-code.
Test Plan: all tests pass
Reviewers: #sourcecontrol, ttung, mitrandir, akushner
Reviewed By: akushner
Subscribers: mpm, akushner, mitrandir
Differential Revision: https://phabricator.fb.com/D2811997
Signature: t1:2811997:1452200059:9e4fca501a22f95d2d9a22d234758f55e292ea9a
Summary:
The existing upstream heurestic for determining when to accept a delta and when
not to takes into account the total ondisk distance from the chain base to the
current rev. In a large repo with 10+ active branches, its pretty easy to get
into a situation where a few full text entries are written, and suddenly new
entries are deciding they need to be full text too because they are too far from
their root, which in turn causes future entries to also choose full texts,
spiraling into huge revlogs.
The fix is to remove the condition around total ondisk distance. The new
heuristic only takes into account the delta chain size and distance, so it
should make the same choice each time, regardless of the amount of branching
happening or the full text choices of other branches.
Test Plan:
Did an hg pull in a repo that was known to be slow before. It was
veyr fast.
Reviewers: mpm, pyd, #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2693043
Summary:
The branch cache is used to store a cache of each branches heads. If your
Mercurial repo doesn't have any branches though, this can be slow.
This tweak allows simplifying the branchcache computation to just say every head
in the repo belongs to the 'default' branch. This shaves 600ms off of some
commit commands.
I tested it by running the entire Mercurial test suite with it enabled, and
scanning the failures to make sure they were only related to repos that had
non-default branches.
Test Plan:
$ cd ~/hg/tests
$ ./run-tests.py -S -j 48 --extra-config-opt=perftweaks.disablebranchcache=True --extra-config-opt=extensions.perftweaks=/data/users/durham/fb-hgext/perftweaks.py
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy
Differential Revision: https://phabricator.fb.com/D2630360
Signature: t1:2630360:1447092762:adab0456ff842cf508b7f46e988ef9d865fa3988
Summary:
The tag cache can be pretty expensive to populate, and in many of our repos we
do not even allow tags, so let's allo disable it entirely.
Test Plan: Added a test
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: #sourcecontrol, rmcelroy
Subscribers: rmcelroy
Differential Revision: https://phabricator.fb.com/D2481606