I am using the purge command in Windows for Mercurial (purge is a bundled extension) to delete all untracked and ignored files from the repository.
hg purge --all
However, it is showing weird behaviour in where it will only delete the deepest child folder in a scenario where you have a parent and a child folder, both of which are ignored.
Thus I have to run the above command multiple times (sometimes 6-7 times in a row), before it deletes all non-tracked and ignore files.
Why is this occurring?