What does this symbol mean in Mercurial?
Solution 1
Those files are "missing." You haven't explicitly removed those files from the repository, and yet mercurial can't find them.
If you commit with hg commit --addremove
then mercurial will remove all of the missing files from the repository. In this case, I think this is what you want to do - you've purposely deleted these files, and you don't want them to appear in future versions of your code. You'll still be able to go to an earlier version and call those files back if you want to.
Solution 2
As @Riley pointed out, it means they're missing. An alternative method of removing them from the repository is to use hg remove --after <filename>
. The comments in the hgbook point out the you can issue the command without specifying the filename, and it will remove all of the missing files, too, but it does complain for every file that isn't missing.
Related videos on Youtube
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Admin
Updated on March 02, 2020Comments
-
Admin over 4 years
I've majorly refactored my project. I've added some new classes, but I've also RightClick > Deleted classes from within Visual Studio Solution Explorer.
What does the ! symbol mean?
All of the items marked with ! were things I've deleted in VS2010. Will this delete them from the repository as well?
-
Martin Geisler over 13 yearsYou have a question about
hg status
? Seehg help status
for the solution. Let me know if the help is not clear enough so that I can improve it.
-
-
Admin over 13 yearsGroovy! Thank you for clearing that up. So I would go hg commit -m "tqerqwer" --addremove?
-
Riley Lark over 13 yearsYep! Stack overflow is making me write more than "Yep!" so I'll reaffirm: "Exactly!" There's a great tutorial at hginit.com
-
Riley Lark over 13 yearsYeah, and this is safer. You shouldn't get in the habit of just tacking --addremove on the end of every commit.
-
nbevans over 13 years
hg addr -n
is useful if you want to do a dry-run to see what files will be added or removed. -
Wim Coenen over 13 yearsYou can also do
hg addremove -s 80
before committing and mercurial will automatically detect renames/copies for files which are still 80% similar. That way you can follow history across renames and mercurial will know what to do when merging with branches without the rename. -
Jmoney38 about 2 yearsAlso
hg amend --addremove
if you already committed and realized this afterwards