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,
.hgignorewon’t ignore files already tracked by Mercurial. Your example indicates the file is already tracked:The file has already been added, but not committed. Use
hg forgetto forget about the file, and then the ignore pattern will take effect..hgignorepatterns match any part of the path, so this is all you need:Note you may want the trailing slash for a directory or it will match files ending in
_DEPRECATEDas 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.