3. July 2011 05:55
So I've been using mercurial for a while now, and each of my repositories has had it's own .hgignore file. After reading the hgrc/mercurial.ini docs I noticed that you can specify an 'ignore' setting in the [ui] section and point it at a file that all repos will use as an ignore file. Great! I only need a single ignore file now. So I set the value to:
ignore = "D:/source/hgignore.txt"
However, when running "hg st" it showed up all the files that should be ignored as missing from the repo. Seems hg wasn't loading the ignore file (and i had removed the file from the repo itself).
Turns out if there is any whitespace at the start of the path mercurial will ignore the file. Changing the line to:
allows the ignore file to be read by hg and it correctly ignores the files in my repository.