Reputation: 903
I have some temp folders in my source tree. I am ignoring them all in .hgignore like below
temp/
It is ignoring all the temp folders e.g.
a/temp
b/temp
a/c/temp
b/d/temp
But I want a specific temp folder for example "a/c/temp" to include in the repository. So I excluded it in .hgignore like below.
!a/c/temp
/temp
But it is not working. "a/c/temp" folder is still being ignored. Any idea?
Upvotes: 2
Views: 1278
Reputation: 923
You need something like that (Negative Lookahead):
syntax: regexp
^(?!a/c).*/temp
and if you want to exlude more directories, for example b/d/temp
syntax: regexp
^(?!a/c|b/d).*/temp
I hope that helps.
Upvotes: 3