Commit Graph

14 Commits

Author SHA1 Message Date
Jun Wu
87e672961e sparse: rename to fbsparse
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
2017-10-13 14:51:27 -07:00
Mateusz Kwapich
dd16a02f8e sparse: remove the failed attempt to change watchman config during test
Summary:
I've seen the failures like https://phabricator.intern.facebook.com/P56599278
which were the result of "enforce_root_files" being set in our global watchman
config.

It appears that the global configs are being picked up only on server start.
Killing server during the test won't help because watchman is automagically
restarted in our dev environment.

The way to do it properly is to mimic
https://github.com/facebook/watchman/blob/master/tests/integration/WatchmanInstance.py
until we do that I've just put a .watchmanconfig to fix the test.

Test Plan: tests is passing now

Reviewers: #mercurial, ttung, durham, wez, zamsden

Reviewed By: wez, zamsden

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3772968

Signature: t1:3772968:1472158987:0e08c5e9f862ba3d74d016d051b852512d06e399
2016-08-26 11:59:52 -07:00
Ryan McElroy
2a07de293c tests: import simplecache from correct place 2016-08-11 06:33:47 -07:00
Jun Wu
8a3a99ba21 hgext: move single file extensions to hgext3rd
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
2016-07-08 13:15:42 +01:00
Martijn Pieters
5b77967854 Backed out changeset 0aa2b8139243
Summary:
The upstream change has now been *properly* landed at
https://selenic.com/repo/hg//rev/6ee50bdeeb32.

Once again, Mea Culpa, yesterday I apparently was in clowntown mode with these
patches.

Test Plan:
Run all affected tests:

  $HGSRC/tests/run-tests.py -l test-pull-createmarkers* test-pushrebase* test-pushvars*

Reviewers: #sourcecontrol, ttung, quark

Reviewed By: quark

Subscribers: mjpieters, durham

Differential Revision: https://phabricator.intern.facebook.com/D3462832

Signature: t1:3462832:1466513182:58d6187c04e0e567a026aba90bf753c76f4949a7

Blame Revision: D3460645
2016-06-21 13:58:55 +01:00
Durham Goode
ec171a5a29 backout: backout e61bd9d5e8ca about file descriptor cache
Summary:
e61bd9d5e8ca requires a change to core that has been accepted but not yet
pushed. This breaks the build, so let's revert it until upstream pushes the
dependency.

Test Plan: Ran the tests

Reviewers: ttung, mjpieters, #sourcecontrol, mitrandir

Reviewed By: mitrandir

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3460645

Signature: t1:3460645:1466465904:cd521a989e475f9987237307a7d4d672d58ba615
2016-06-20 16:38:48 -07:00
Martijn Pieters
08afaea81e Get rid of getfilecache now that it is no longer needed
Summary:
Now that my upstream patch for filedescriptor class access has landed the helper function to bypass the descriptor protocol can go altogether.

Depends on D3454878

Test Plan:
Run affected extension tests:

  $HGSRC/tests/run-tests.py -l test-sqldirstate-* test-reflog* test-sparse*

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3456368
2016-06-20 12:12:32 +01:00
Martijn Pieters
9b160b48c6 Use one function to access the filecache descriptor, and wrapfunction to patch
Summary:
There were 3 clowntowny versions of the wrapfiledescriptor function, 2 being
dangerously wrong about how they scan the class hierarchy. All because
`classobj.descriptorname` invokes the descriptor protocol and the filecache
descriptor is not set up for that access.

Instead of one function to do it all, use one utility function to retrieve
the descriptor object from the class __dict__ to avoid the descriptor protocol
kicking in, and use mercurial.extensions.wrapfunction to do the actual
wrapping.

I've sent a patch upstream to fix accessing the filecache descriptor on the
class; if accepted we can drop the getfilecache utility function altogether,
leaving only the wrapfunction calls.

Test Plan:
Run affected extension tests:

   $HGSRC/tests/run-tests.py -l test-sqldirstate-* test-reflog* test-sparse*

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3454878
2016-06-20 12:12:32 +01:00
Durham Goode
fb442c3ae1 tests: fix lint error 2016-06-17 14:54:22 -07:00
Durham Goode
f7d38f2065 fb-hgext: disable system watchman config in tests
The system watchman config can interfere with test runs, so let's disable it via
the environment variable.
2016-06-16 18:56:37 -07:00
Martijn Pieters
567f9cd73e Prepare for hgwatchman being replaced by fsmonitor
Summary:
Support both fsmonitor and hgwatchman for now, until fully rolled over to
fsmonitor.

Test Plan:
Run $HG/tests/run-tests.py test-sparse-extensions.t (disable simplecache lines
if not installed to ensure the fsmonitor test at least runs).

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3174946

Tasks: 10804941
2016-04-14 10:59:05 +01:00
Laurent Charignon
5ebc03718c cleanup: fix quoting patterns in tests
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

Differential Revision: https://phabricator.fb.com/D2811856
2016-01-07 18:30:24 -08:00
Durham Goode
5b01596008 sparse: move hgwatchman integration test to test-sparse-extensions.t
We now have a test file explicitly for extension integrations. So let's move the
hgwatchman test.  Includes some minor changes to make it work.
2015-06-15 17:44:39 -07:00
Durham Goode
59fcb5efbe sparse: add caching around sparse profile reading
Summary:
Previously we would have to decompress the entire manifest to check if each
sparse profile existed. This slowed hg status down by 500ms (2x).

This patch adds caching when simplecache is enabled.

Test Plan:
Added a test.  Also tried it in fbsource. Verified repeated hg
status's did not parse the manifest

Reviewers: rmcelroy, ericsumner, lcharignon, akushner, mitrandir

Differential Revision: https://phabricator.fb.com/D2158178
2015-06-15 17:20:53 -07:00