The error message from Mercurial tells us that your syntax: glob
line is not read by Mercurial. Patterns in ignore files default to regular expressions, and *.suo
is indeed an invalid regular expression (a regex cannot start with *
).
Since this is on Windows, and since the file is UTF-8 encoded, then the only reasonable explanation is that there is somehthing that makes Mercurial ignore the syntax: glob
line. An UTF-8 BOM is such a "something"! A byte order mark is a small signature inserted into UTF-16 encoded files to signal the byte order of the file. This is not needed or recommended for UTF-8 encoded files, but Windows editors have a tendency to insert them anyway.
To fix this, please open the file in Notepad and choose "Save As". Then pick ANSI as the encoding. Your .hgignore
file is pure ASCII, so this will effective be the same as UTF-8 without a BOM.