Mercurial > hg
diff tests/test-hgignore.t @ 25215:4040e06e9b99
match: add 'include:' syntax
This allows the matcher to understand 'include:path/to/file' style rules. The
files support the standard hgignore syntax and any rules read from the file are
included in the matcher without regard to the files location in the repository
(i.e. if the included file is in somedir/otherdir, all of it's rules will still
apply to the entire repository).
author | Durham Goode <durham@fb.com> |
---|---|
date | Sat, 16 May 2015 15:56:52 -0700 |
parents | a04c7b74b3d5 |
children | dc562165044a |
line wrap: on
line diff
--- a/tests/test-hgignore.t Mon May 18 16:27:56 2015 -0700 +++ b/tests/test-hgignore.t Sat May 16 15:56:52 2015 -0700 @@ -167,3 +167,25 @@ ? a.c ? a.o ? syntax + +Check using 'include:' in ignore file + + $ hg purge --all --config extensions.purge= + $ touch foo.included + + $ echo ".*.included" > otherignore + $ hg status -I "include:otherignore" + ? foo.included + + $ echo "include:otherignore" >> .hgignore + $ hg status + A dir/b.o + ? .hgignore + ? otherignore + +Check recursive uses of 'include:' + + $ echo "include:nestedignore" >> otherignore + $ echo "glob:*ignore" > nestedignore + $ hg status + A dir/b.o