Using Mercurial, I need to ignore all files and directories except directories "tests" and "languages" and files in those directories. That all must be done with regex and .hgignoere
Files:
- tests\junk.txt
- cms\tests\some_file.txt
- cms\languages\users\lang.txt
- languages\lang2.txt
- tests.txt
- proba/tests.txt
I tried with this:
^(?!test|test/|test$|languages|languages/|languages$)
but this only matches the files that starts with test and language:
- tests\junk.txt
- languages\lang2.txt
What I want is to matches also
- cms\tests\some_file.txt
- cms\languages\users\lang.txt
Any advice would be appreciated.