Just made the mistake of using addremove to try and remove some files that were deleted without using hg remove
Now have hundreds of files that are going to be added on the next commit
Is there anyway I can quickly remove all these added files without having to resort to a bash script or even worse hg removing or forgetting each file manually?
If you want to just use internal
hgcommands, you can do the following:Which will forget any file that’s marked as “added” in the working directory. It makes use of the rather powerful filesets feature of Mercurial.
There are additional filters you can use when specifying files, which allows you to easily fix other mistakes. For example, easily re-add removed files but nothing else
hg add "set:removed()". The functionality is similar to (tho’ thankfully simpler than) mercurial revsets, and can be studied with: