newbie: how to remove specific hgignore specification

Jesse Glick jesse.glick at sun.com
Mon Feb 25 11:39:30 CST 2008


slalande wrote:
> I have a mercurial project that contains many restructured files
> which can be converted into html file.  So in the majority of the
> directory, I want to ignore those html file.  But for some specific
> directory, I want to include those html file in the mercurial project
> because they represent some documentation.

You can just explicitly add the files you want, even if they are listed 
in the ignore pattern. (Adding the directory in which they reside 
probably will not get them, but if you add the individual filenames it 
should work.) This could be dangerous if there are a lot of such files 
and you often add more, since you would need to remember to add the 
newly created HTML files in this dir.

You might also be able to use negative lookahead in a regexp in the 
.hgignore file, though I have not tried this. That would let you match 
the parent directory structure of all dirs except the docs dir.



More information about the Mercurial mailing list