sapling/tests/test-fb-hgext-sparse-extensions.t
Phil Cohen f85b6e89f9 extensions: turn off simplecache in one test, update another
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
2018-04-13 21:50:55 -07:00

57 lines
1.7 KiB
Perl

test sparse interaction with other extensions
$ hg init myrepo
$ cd myrepo
$ cat > .hg/hgrc <<EOF
> [extensions]
> sparse=$TESTDIR/../hgext/fbsparse.py
> strip=
> # Remove once default-on:
> simplecache=
> [simplecache]
> showdebug=true
> cachedir=$TESTTMP/hgsimplecache
> EOF
Test integration with simplecache for profile reads
$ $PYTHON -c 'import hgext.simplecache' || exit 80
$ printf "[include]\nfoo\n" > .hgsparse
$ hg add .hgsparse
$ hg commit -qm 'Add profile'
$ hg sparse --enable-profile .hgsparse
$ hg status --debug
got value for key sparseprofile:.hgsparse:52fe6c0958d7d08df53bdf7ee62a261abb7f599e:v1 from local
Test fsmonitor integration (if available)
TODO: make fully isolated integration test a'la https://github.com/facebook/watchman/blob/master/tests/integration/WatchmanInstance.py
(this one is using the systemwide watchman instance)
$ touch .watchmanconfig
$ $PYTHON -c 'import hgext.fsmonitor' || exit 80
$ echo "ignoredir1/" >> .hgignore
$ hg commit -Am ignoredir1
adding .hgignore
$ echo "ignoredir2/" >> .hgignore
$ hg commit -m ignoredir2
$ hg sparse --reset
$ hg sparse -I ignoredir1 -I ignoredir2 -I dir1
$ mkdir ignoredir1 ignoredir2 dir1
$ touch ignoredir1/file ignoredir2/file dir1/file
Run status twice to compensate for a condition in fsmonitor where it will check
ignored files the second time it runs, regardless of previous state (ask @sid0)
$ hg status --config extensions.fsmonitor=
? dir1/file
$ hg status --config extensions.fsmonitor=
? dir1/file
Test that fsmonitor ignore hash check updates when .hgignore changes
$ hg up -q ".^"
$ hg status --config extensions.fsmonitor=
? dir1/file
? ignoredir2/file