If you want to:
- All those who have a status
! (the file is tracked in the repository, but not on the disk), which must be deleted - All those who have a status
? (file unknown) will be added
Then you can simply execute the following command:
hg addremove --similarity 90
You can, if you want, drop the --similarity 90 part, but if you leave it, it will try to find out if you added the renamed files from some of them.
If you can, I would try using TortoiseHg to make addremove, since it can also do a similarity check to see if you copied the files, this can make the history for these files more correct if they are copies from existing ones (and that’s all tracked) files. The addremove --similarity 90 only checks for renames / moves, not copies.
Or, if you want only some of the files, you can do it manually. For each of the files with status ! you can run the following command:
hg remove --after X
where X is the path to the file and the file name, for example:
hg remove --after HRTRL/css/grid.css
and then for each of the status ones ? files you want to add:
hg add X
Example:
hg add HRTRL/img/webheadercenter.jpg
source share