.hgignore whole directory tree excepting one specific file

Posted by John Mee on Stack Overflow See other posts from Stack Overflow or by John Mee
Published on 2009-11-05T03:09:41Z Indexed on 2010/05/10 11:14 UTC
Read the original article Hit count: 297

Filed under:
|

Can anyone tell me the .hgignore pattern to track one specific file in a directory and to ignore everything else?

I have a "media" directory which contains a "default.png", for obvious purposes, and the rest of the directory will hold user media. We want hg to ignore everything in the media directory excepting the default file.

© Stack Overflow or respective owner

Related posts about mercurial

Related posts about hgignore