简体   繁体   中英

hg branches and hg forget

In the early stages of one of my projects the person I was working with added their entire elipse workspace to our mercurial repository. After I updated the .hgignore file to prevent this from happening again I ran hg forget to get rid of all the files out of our repository.

The problem is that when this other person pulled later on and changed to a new branch I had created he lost all his workspace plugins etc and can no longer build the project.

What is going wrong? doesn't .hgignore do just that, ignore the files? Why is it going through and deleting the files in his local copy?

What's going on is you ran hg forget which removed the files from the repository. The next time the developer updated their local working copy from that same repository to a revision after the removal of the files, the files were removed from that person's working copy, thus breaking his workspace.

Note that hg forget is just a hg remove -aF , but it's your workspace that Hg leaves the files in, not his.

See more here and here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM