开发者

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 pulle开发者_JAVA百科d 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜