Reputation: 30985
Is it possible, while using glob syntax for an .hgignore file, to recursively ignore certain files and folders, except one?
Assuming that you have:
a/
a/b
a/c
a/d
Something like:
syntax globe:
a
^a/b
This should ideally ignore c and d and keep b.
I know this has been discussed in other SO questions, but it seems they're all using regex mode for the syntax.
Upvotes: 0
Views: 4257
Reputation: 78330
If you want to ignore all but one, just add that one. Adding a file overrides ignoring it, which differs from subversion or cvs, but is incredibly handy.
Upvotes: 3
Reputation: 28268
The glob syntax is transformed to regex in match.py. It seems that this is the syntax you are looking for:
syntax:glob
a/*[!b]
Upvotes: 2