Well, if nothing works, you can always just ask Mercurial to forget everything, and then return empty before committing:
Here is how I reproduced it, first create an initial repo:
hg init md app md app\tmp echo a>app\empty echo a>app\tmp\empty hg commit -m "initial" -A
Then add some files that we later want to get rid of:
echo a >app\tmp\test1.txt echo a >app\tmp\test2.txt hg commit -m "adding" -A
Then forget the files we don’t need:
hg forget app\tmp\* hg status <-- will show all 3 files hg revert app\tmp\empty hg status <-- now empty is gone echo glob:app/tmp>.hgignore hg commit -m "ignored" -A
Please note that all .hgignore means that Mercurial does not detect new files during addremove or commit -A , if you explicitly tracked files matching your ignore filter, Mercurial will track changes to these files.
In other words, even if I asked Mercurial to ignore
app/tmp above, the
empty file inside will not be ignored or deleted, since I explicitly asked Mercurial to track it.
source share