Reputation: 30995
I want to ignore everything BUT a subfolder in Mercurial.
The folder I want to keep:
a/b/c/d/e/f
Everything else under:
a/b
Should be ignored.
I'm using regexp mode in the .hgignore file. This is what I've so far:
a/b/(?!c)
a/b/c/(?!d)
a/b/c/d/(?!e)
a/b/c/d/e/(?!f)
Even if this works fine, I would like to shrink it to a single line:
a/b/(?!c/d/e/f)
Except this doesn't work. I tried to escape the slashes in several ways, but it didn't help.
Any hint?
Upvotes: 3
Views: 289
Reputation: 78350
You probably know this already, but you can just add the stuff in a/b/c/d/e/f without adding an exception to the .hgignore. It's not perfect, you have to remember to add any new files, but I thought I'd mention it since it's non-obvious to we CVS/SVN refugees.
Upvotes: 1