为什么 TortoiseHg 不显示“合并冲突”?
问题的简短版本:由于我已经有了 TortoiseHg,所以我右键单击该文件试图直观地查看合并冲突,但没有办法看到它?
详细信息:
为了制作一个简单的合并冲突案例,我在 Win 7 上hg init
一个存储库,然后将其克隆到另一个文件夹。
现在,在一个工作目录中,我添加了“代码为 123”这一行,并已提交。
在另一个文件夹中,我执行了“hg pull”和“hg update”
现在,我返回到第一个文件夹,并将“123”更改为“123abc”,然后执行“hg commit”
然后我去到另一个文件夹并将“123”编辑为“123xyz”,然后执行“hg commit”,当“hg push”时,它说不能。
所以我尝试使用任何可视化工具来查看冲突情况,但是...... TortoiseHg 似乎没有任何选项可以做到这一点?
Short version of the question: Since I already have TortoiseHg, I right clicked on that file trying to see the merge conflict visually, but there is no way to see it?
Details:
To make a simple case of merge conflict, I hg init
a repo on Win 7, and then clone it to another folder.
Now, in one working directory, i added the line "the code is 123", committed.
And in the other folder, i did an "hg pull" and "hg update"
Now, I go back to the first folder, and change "123" to "123abc", and then do an "hg commit"
And then I go to the other folder and edit "123" to "123xyz" over there, and do an "hg commit", and when "hg push", it says it can't.
So I try to use any visual tool to see how the conflict is like, but ... TortoiseHg doesn't seem to have any option to do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
目前还没有冲突。与 svn 或 cvs 相同,您需要将更改提取到第二个存储库中,然后才能提交回第一个存储库,这就是造成冲突的原因。在第二个存储库中,您需要
hg pull
从第一个存储库中获取 123abc 更改;这将在存储库 2 中创建为新分支hg merge
来合并更改 - 现在存在冲突,您需要解决hg commit
才能提交解决方案冲突,现在您可以
hg push
。There isn't a conflict yet. Same as svn or cvs you need to fetch changes into the second repository before you can commit back to the first and it's this that creates the conflict. In the second repository, you need to
hg pull
to fetch the 123abc change from your first repository; this'll be created in repoistory 2 as a new branchhg merge
to merge the changes - now there's a conflict that you need to resolvehg commit
to commit the resolution of the conflictand now you can
hg push
.