sapling/tests/test-sparse-extensions.t
Mark Thomas 9a19e06fee strip: move extension to core and rename to debugstrip
Summary:
Move the strip extension to core.  Rename the command to `hg debugstrip` as it
is not intended for use by users.  Users should use `hg hide` instead.

Reviewed By: quark-zju

Differential Revision: D14185822

fbshipit-source-id: ef096488cb94b72a7bb79f5bf153c064e0555b34
2019-02-25 03:55:08 -08:00

60 lines
1.6 KiB
Perl

test sparse interaction with other extensions
$ hg init myrepo
$ cd myrepo
$ cat > .hg/hgrc <<EOF
> [extensions]
> sparse=
> # Remove once default-on:
> simplecache=
> [simplecache]
> showdebug=true
> cachedir=$TESTTMP/hgsimplecache
> EOF
Test integration with simplecache for profile reads
$ $PYTHON -c 'import edenscm.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:v2 from local
got value for key sparseprofile:.hgsparse:52fe6c0958d7d08df53bdf7ee62a261abb7f599e:v2 from local
#if fsmonitor
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
$ 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
? dir1/file
$ hg status
? dir1/file
Test that fsmonitor ignore hash check updates when .hgignore changes
$ hg up -q ".^"
$ hg status
? dir1/file
? ignoredir2/file
#endif