Just to get this out there for any future searchers: Regex contortions like this are only necessary if you expect a lot more exception files to be added to the working directory in the future.
If you just want to make the current ones exceptions, you can just hg add
them. Unlike svn and cvs, in mercurial you can add
an ignored file and it overrides the .hgignore
-- future changes will be automatically tracked.
It's not unheard of to have .*
in your .hgignore
file and then hg add
the files you want tracked.
In this case, The more traditional mercurial way to do this would be a .hgignore
file like this:
/Properties/AssemblyInfo\.cs
followed by:
$ hg add Test/Properties/AssemblyInfo.cs
$ hg add Tests/Properties/AssemblyInfo.cs
If you have hundreds of Test and Tests you can add them with a find
, but if you create new ones every day then the regex is definitely the way to go.