I have a RE checker that says this should work. What am I doing wrong?!?
Example of what I am trying to ignore:
apps/cms/templates/cms/test_bup_DEPRECATED/widgets/page_link.html
And my .hgignore file:
syntax: regexp
^static
.*_DEPRECATED.*
I have tried all sorts of things and no success :(
Another failed attempt:
syntax: glob
_DEPRECATED/*
UPDATE: I edited the .hgignore file to this:
syntax: glob
**_DEPRECATED/**
But hg st still doing this:
$ hg st | grep DEPR
A apps/cms/templates/cms/test_DEPRECATED/base.html
Same result for this:
syntax: glob
_DEPRECATED
First, .hgignore won't ignore files already tracked by Mercurial.  Your example indicates the file is already tracked:
$ hg st | grep DEPR
A apps/cms/templates/cms/test_DEPRECATED/base.html
The file has already been added, but not committed.  Use hg forget to forget about the file, and then the ignore pattern will take effect.
.hgignore patterns match any part of the path, so this is all you need:
syntax: regexp
_DEPRECATED/
Note you may want the trailing slash for a directory or it will match files ending in _DEPRECATED as well, otherwise drop it.
To work out ignore patterns, the ignore GUI in TortoiseHg (thg ignore) is very helpful.  It displays all files not tracked and not ignored, and patterns can be entered until the right files are ignored.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With