What does this symbol mean in Mercurial?

15,035

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.

Share:
15,035

Related videos on Youtube

Admin
Author by

Admin

Updated on March 02, 2020

Comments

  • Admin
    Admin over 4 years

    enter image description here

    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
      Martin Geisler over 13 years
      You have a question about hg status? See hg help status for the solution. Let me know if the help is not clear enough so that I can improve it.
  • Admin
    Admin over 13 years
    Groovy! Thank you for clearing that up. So I would go hg commit -m "tqerqwer" --addremove?
  • Riley Lark
    Riley Lark over 13 years
    Yep! Stack overflow is making me write more than "Yep!" so I'll reaffirm: "Exactly!" There's a great tutorial at hginit.com
  • Riley Lark
    Riley Lark over 13 years
    Yeah, and this is safer. You shouldn't get in the habit of just tacking --addremove on the end of every commit.
  • nbevans
    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
    Wim Coenen over 13 years
    You 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
    Jmoney38 about 2 years
    Also hg amend --addremove if you already committed and realized this afterwards