During merges mercurial leaves .orig file for any unresolved file. But after manually resolving problems and marking a file correct it does not delete the .orig file. Can it
This is not an automatic way of removing extra files, but it's simple enough to run manually.
The hg st can show unknown or not tracked files. You can use this output as an argument to the system rm command. Here's an actual example I just performed:
$ # SHOW ONLY THE CRUFT
$ hg status --unknown
? config/settings.rb.orig
? lib/helpers.rb.orig
? routes/main.rb.orig
$ # THE CRUFT WITHOUT THE "?" PREFIX
$ hg status --unknown --no-status
config/settings.rb.orig
lib/helpers.rb.orig
routes/main.rb.orig
$ # SAFELY REMOVE ALL CRUFT
$ rm -- `hg st -un`
If you have empty directories left behind, the -r and -d flags for rm might help.
As a bonus, hg status --ignored could be used to cleanup all those ignored temp files as well as swap files from your editor (e.g., Vim).