Purge deletes unknown files regardless of "Delete # unknown files" checkbox
Created originally on Bitbucket by patches11 (Robert Belcher)
Like the title says. You can test this by creating a repo with two files, adding one to hgignore, opening the Purge dialog, and deselecting the "Delete # unknown files" checkbox.
The command line that achieved the result I was seeking (deleting ignored files only) is this:
#!batch
hg purge --all -X "set:not hgignore()"
This issue can cause data loss if a user has not yet added some desired unknown files and wants to do some cleanup before committing.