2024-04-12 10:00:04

SVN仍然存在冲突?

如何将这个目录从冲突中删除?我不在乎是用“他们的”还是“我的”或其他什么来解决……

PS C:\Users\Mark\Desktop\myproject> svn ci -m "gr"
svn: Commit failed (details follow):
svn: Aborting commit: 'C:\Users\Mark\Desktop\myproject\addons' remains in conflict

PS C:\Users\Mark\Desktop\myproject> svn resolve --accept working C:\Users\Mark\Desktop\myproject\addons
Resolved conflicted state of 'C:\Users\Mark\Desktop\myproject\addons'

PS C:\Users\Mark\Desktop\myproject> svn ci -m "grr"
svn: Commit failed (details follow):
svn: Commit item 'addons' has copy flag but an invalid revision

PS C:\Users\Mark\Desktop\myproject> svn update
   C addons
svn: Can't move 'addons\debug_toolbar\templates\debug_toolbar\.svn\tmp\entries' to 'addons\debug_toolbar\templates\debug
_toolbar\.svn\entries': The file or directory is corrupted and unreadable.

PS C:\Users\Mark\Desktop\myproject> svn cleanup

PS C:\Users\Mark\Desktop\myproject> svn update
Skipped 'addons'
At revision 51.
Summary of conflicts:
  Skipped paths: 1

PS C:\Users\Mark\Desktop\myproject> svn ci -m "grrr"
svn: Commit failed (details follow):
svn: Aborting commit: 'C:\Users\Mark\Desktop\myproject\addons' remains in conflict

当前回答

如果您在解决问题时遇到了麻烦(像我一样),并且由于对资源进行了许多更改而无法删除和更新资源,再加上您使用的是eclipse subversion而不是本机客户端,请遵循以下步骤:

make a copy of your entire project dir perform team>disconnect within eclipse, and choose to delete the svn metadata then choose team>share project, and point to the very same folder that your project resides in choose yes, and commit everything (you may want to exclude some very local resources, like configuration files) if you have deleted or moved some resources prior to your first commit trial, delete those old resources (they should have doubled up, one in old location, one in new) and commit those deletions.

你就完成了。

其他回答

好吧,下面是如何修复它:

svn remove --force filename
svn resolve --accept=working  filename
svn commit

更多详情见:http://svnbook.red-bean.com/en/1.8/svn.tour.treeconflicts.html

我想正确的解决方法是:

(1) backup your-file/your-directory
(2) svn revert your-file/your-directory
(3) svn update your-file/your-directory
(4) Merge the backup your-file/your-directory to the updated one.
(5) svn ci -m "My work here is done"

如果您正在使用Eclipse IDE,并且在提交时偶然发现了这个错误,这里有一个工具内解决方案。我使用Subclipse,但subversion的解决方案可能类似。

您可能没有注意到的是,在冲突文件上有一个额外的符号,它将文件标记为“冲突”。

右键单击文件,选择“Team”和“Edit conflicts…”。选择适当的行动。我之前在文本级别上手动合并了文件,所以我选择了第一个选项,这将把本地副本的当前状态作为“已解决的解决方案”。现在点击“OK”,就这样。

冲突的符号应该已经消失,您应该能够再次提交。

如果您在解决问题时遇到了麻烦(像我一样),并且由于对资源进行了许多更改而无法删除和更新资源,再加上您使用的是eclipse subversion而不是本机客户端,请遵循以下步骤:

make a copy of your entire project dir perform team>disconnect within eclipse, and choose to delete the svn metadata then choose team>share project, and point to the very same folder that your project resides in choose yes, and commit everything (you may want to exclude some very local resources, like configuration files) if you have deleted or moved some resources prior to your first commit trial, delete those old resources (they should have doubled up, one in old location, one in new) and commit those deletions.

你就完成了。

下面还有一个解决方案,

如果整个文件夹被删除,SVNis抛出错误“admin file . SVNis missing”,将使用以下方法将冲突解决到工作状态。

svn resolve --accept working "file / directory name "