使用乌龟处理SVN中的冲突? [英] Handling conflicts in SVN with Tortoise?

查看:428
本文介绍了使用乌龟处理SVN中的冲突?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当出现合并冲突或类似问题时,这都会使我放慢速度。

Any time an issue comes up like a merge conflict or something similar, it really slows me down.

有人可以向我解释如何强制解决冲突吗?

Can someone explain to me how to force-resolve conflicts?

例如,我的一个伙伴对存储库中的文件进行了编辑并提交。当他这样做时,我已经重命名了该文件,并在我的工作副本上对其进行了许多编辑。

For example, a buddy of mine made an edit to a file on the repository and committed. While he was doing that, I had already renamed that file and made many edits to it on my working copy.

当我提交时,很明显会出现冲突错误。他编辑的文件在我的工作副本中甚至不存在。我该如何告诉SVN不再哭喊冲突并强迫它接受我的工作副本(即用我的工作副本覆盖头部修订版)。

When I went to commit, I get the conflict error obviously. The file he edited doesn't even exist anymore on my working copy. How can I tell SVN to simply quit crying about the conflict and force it to accept my working copy (ie, overwrite the head revision with my working copy).

推荐答案

更新工作副本时,可以右键单击日志列表,然后选择解决冲突的方法:

When you update your working copy you can right-click in the log list and chose how to resolve the conflict:


  • 使用编辑器/ TortoiseMerge(或您配置的任何合并工具)解析

  • 使用其解析,即存储库中的版本

  • 使用 mine来解析,即文件的版本。

当正确删除文件时,此方法也有效 -即,如果您想从存储库中实际删除文件,则需要使用svn删除文件。如果出于方便起见删除了文件,则可能需要 svn还原在更新之前将其删除,因为工作副本中缺少的文件也是修改后的文件(不足为奇)。

This also works when deleting files properly -- i.e. you need to delete the file using svn if you want to actually delete it from the repository. If you removed the file for convenience reasons you might want to svn revert it before updating as a file missing from the working copy is a modified file too (unsurprisingly).

总结一下:您不能告诉svn停止哭泣并简单地覆盖您的工作副本。这是一件好事。您需要解决冲突(可能意味着仅覆盖当前状态),将受影响的文件标记为已解决( svn已解决),然后提交结果。

To sum it up: you can't tell svn to "stop crying" and simply overwrite with your working copy. This is a good thing. You need to resolve the conflict (which could mean simply overwriting the current state), mark the affected files as resolved (svn resolved) and then commit the result.

这篇关于使用乌龟处理SVN中的冲突?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆