Xcode 和 SCM 冲突错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1465797/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 18:51:40  来源:igfitidea点击:

Xcode and SCM conflict error

svnxcodeversion-controlconflict

提问by Adam Libonatti-Roche

I am getting this following error even though i am the only person working on this project.

即使我是这个项目的唯一工作人员,我也收到以下错误。

> Error: 155015 (A conflict in the working copy obstructs the current operation) Description: Commit failed

why would this occur as all i keep doing is committing the project every time before do some serious coding. I have committed three times now it is not allowing any more as it throws that error.

为什么会发生这种情况,因为我一直在做的就是每次在进行一些认真的编码之前提交该项目。我已经犯了 3 次,现在它不再允许了,因为它抛出了那个错误。

采纳答案by Terry Wilcox

You've got a conflict that needs to be resolved in svn. If it's not one of the files, check if it's a tree conflict.

你有一个需要在 svn 中解决的冲突。如果它不是文件之一,请检查它是否是树冲突。

From the SVN 1.6 release notes:

来自SVN 1.6 发行说明

Subversion 1.6 recognizes a new kind of conflict, known as a "tree conflict". Such conflicts manifest at the level of directory structure, rather than file content.

Situations now flagged as conflicts include deletions of locally modified files, and incoming edits to locally deleted files. Files and directories which are victims of a tree conflict cannot be committed before the conflict is marked resolved.

Note that Subversion is still treating renames as a "copy+delete" operation, so file renames causing tree conflicts can only be detected in terms of file additions and deletions. Because of this, false positives during tree conflict detection are possible.

To facilitate tree conflict detection, attempting to commit the deletion of a file which has already been deleted in the HEAD revision now causes an error. In Subversion 1.5, this was treated as a no-op, potentially resulting in "empty" revisions which contained no changes.

Subversion 1.6 识别出一种新的冲突,称为“树冲突”。此类冲突体现在目录结构级别,而不是文件内容级别。

现在标记为冲突的情况包括删除本地修改的文件,以及对本地删除文件的传入编辑。在冲突被标记为已解决之前,不能提交作为树冲突受害者的文件和目录。

请注意,Subversion 仍然将重命名视为“复制+删除”操作,因此导致树冲突的文件重命名只能在文件添加和删除方面进行检测。因此,树冲突检测期间的误报是可能的。

为了便于树冲突检测,尝试提交已在 HEAD 修订版中删除的文件的删除现在会导致错误。在 Subversion 1.5 中,这被视为无操作,可能导致不包含任何更改的“空”修订。

回答by snibbe

Ok everyone, here's precisely how to solve this problem, assuming your file has the current latest version:

好的,大家,这里就是如何解决这个问题,假设你的文件有当前的最新版本:

prompt$ svn resolve --accept working yourfilenamehere

prompt$ svn resolve --accept 在此处使用您的文件名

Resolved conflicted state of yourfilenamehere

此处解决了您的文件名的冲突状态

Then check in normally from the xcode GUI. That's it!

然后从 xcode GUI 正常签入。就是这样!

回答by snibbe

Another solution is to use a visual client such as Versionsand choose "resolve conflicts" from the menu, which seems to apply the above and other resolution techniques.

另一种解决方案是使用可视化客户端,例如Versions并从菜单中选择“解决冲突”,这似乎应用了上述和其他解决技术。