无法解决与 SVN 的树冲突

发布于 2024-08-17 06:14:54 字数 292 浏览 8 评论 0原文

我最近遇到了一个很奇怪的颠覆行为。

我刚刚将分支的本地副本与远程分支合并。一切都很顺利,但我遇到了 1 棵树冲突(本地删除、远程更新)。

好吧,我想,适当地修改了工作副本并运行“svn resolve --accept=working -R .”。

Subversion 告诉我它已经解决了我的问题,并且“svn st”不再显示任何问题。因此,我尝试提交,但 svn 告诉我,内部文件夹之一(在我的冲突文件夹内)已过期并建议 svn up,但这使该文件夹再次发生冲突!

我该怎么做才能摆脱这个可见的圈子?

I recently encountered a very weird behavior of subversion.

I just merged my local copy of a branch with a remote branch. Everything went smooth, but I've got 1 tree conflict (local delete, remote update).

Okay, thought I, modified the working copy appropriately and ran "svn resolve --accept=working -R .".

Subversion told that it has resolved my problems and "svn st" no longer showed any issues. So, I tried to commit, but svn told me that one of the inner folders (inside my conflicted one) was out of date and suggested to svn up, BUT it made the folder to be in conflict again!

What shall I do to get out of this visious circle?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

家住魔仙堡 2024-08-24 06:14:54
~/sandbox/jabira > svn resolve  --accept=theirs-full testClient/
svn: warning: Tree conflicts can only be resolved to 'working' state; 'testClient' not resolved

~/sandbox/jabira  > svn resolve  --accept=working testClient/
Resolved conflicted state of 'testClient'

希望这有帮助

~/sandbox/jabira > svn resolve  --accept=theirs-full testClient/
svn: warning: Tree conflicts can only be resolved to 'working' state; 'testClient' not resolved

~/sandbox/jabira  > svn resolve  --accept=working testClient/
Resolved conflicted state of 'testClient'

Hope this help

喜爱纠缠 2024-08-24 06:14:54

这可能有帮助,也可能没有帮助,但有时“svn cleanup”会修复奇怪的元数据问题。如果您查看干净的工作副本,干净的副本是否存在相同的问题?如果是这样,那么前面的答案听起来像是朝着正确方向迈出了一步

This may or may not help, but sometimes an "svn cleanup" will fix weird metadata issues. If you check out a clean working copy, does the clean copy have the same issue? If so then the previous answer sounds like a step in the right direction

原谅过去的我 2024-08-24 06:14:54

这对我来说是有效的,放弃所有本地更改并使用服务器存储库中的文件:

svn update --accept theirs-full

svn resolve --accept theirs-full <pathname>

出现此消息:W155027:树冲突只能解决为“工作”

下一步不直观,但这实际上减少了捕获 - 22:

svn resolve  --accept=working <pathname>

现在递归地恢复所有“工作”更改。这撤销了我所有的本地更改。

svn revert -R .

恢复正常,没有错误:

svn update

This is what worked for me to abandon all local changes and go with the files from the server repository:

svn update --accept theirs-full

svn resolve --accept theirs-full <pathname>

This message appears: W155027: Tree conflict can only be resolved to 'working'

Unintuitive next step but this actually cuts the catch-22:

svn resolve  --accept=working <pathname>

NOW revert all the "working" changes recursively. This undid all my local changes.

svn revert -R .

Back to normal, with no errors:

svn update
缱倦旧时光 2024-08-24 06:14:54

您可以使用 svn resolve 命令以外的其他方法:

  1. 创建冲突文件的补丁。 (或使用 svn 导出对冲突文件夹的版本进行备份...)
  2. 更新存储库(svn update)
  3. 应用之前完成的补丁(或用备份替换冲突的文件/文件夹)
  4. 提交更改(svn commit)

You can use an other way than the svn resolve command:

  1. Create a patch of the conflicted file. (or a backup of your version of the conflicted folder with svn export ...)
  2. Update your repository (svn update)
  3. Apply the patch previously done (or replace the conflicted file/folder with the backup)
  4. Commit the change (svn commit)
腻橙味 2024-08-24 06:14:54

您在进行合并时可能没有更新文件夹,或者在合并之前某个地方存在冲突。要修复此问题,您必须将主干(目标文件夹)恢复到以前的版本。然后对该文件夹运行清理。然后对分支文件夹(源文件夹)运行清理。然后再次更新这两个文件夹。如果您在任何工作流程中看到红色线条,那么您需要首先恢复这些文件,然后将它们恢复到您想要的状态。然后更新文件夹(是的,再一次)。最后再次执行合并。

You probably didn't have your folders updated when you did the merge, or there was a conflict somewhere before the merge. To fix, you'd have to revert your trunk (target folder) to the previous revision. Then run clean-up on that folder. Then run cleanup on the branch folder (source folder). Then update both folders again. If you're getting lines in red in any workflow, then you need to revert those files first, then get them into the state that you want them in. Then update the folders (yes, once again). Finally perform the merge again.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文