svn 合并功能因树冲突而中断

发布于 2024-07-29 04:26:24 字数 611 浏览 11 评论 0原文

我不知道svn团队什么时候决定对我们造成树冲突,但它已经完全破坏了svn的合并功能。

我有一个分支,我想将主干的最新更改合并到分支中。 我已经完成了一次这样的合并,但是由于树冲突而失败了。 命令如下:

$ svn --force merge -r 3185:3192 svn://chamar2/rx-services/SAMS .
svn: Attempt to add tree conflict that already exists

我第一次尝试此合并(没有 --force)时,它只创建了树冲突,并且没有合并任何内容。 现在它只报告上面的消息。

如果我在分支工作副本上执行 svn status ,它会显示所有具有尚未合并回主干的更改的文件。 当然,我的分支的目的是在尚未在主干中进行这些更改的情况下进行。

当他们这样做时,他们在想什么?

我还没有找到任何关于导致树冲突的原因以及既然 svn 创建了这些东西我如何继续工作的可用信息。

有没有办法告诉 svn 忘记树冲突并像以前一样进行合并?

我使用的是 1.6 客户端和较旧的 svn 服务器(可能是 1.3.1)。

I don't know when the svn team decided to inflict tree conflicts on us but it has completely broken the merge functionality of svn.

I have a branch and I want to merge the latest changes from the trunk into the branch. I've already done one such merge, but this one fails because of a tree conflict. Here's the command:

$ svn --force merge -r 3185:3192 svn://chamar2/rx-services/SAMS .
svn: Attempt to add tree conflict that already exists

The first time I tried this merge (without the --force) it only created the tree conflict and did not merge anything. Now it just reports the message above.

If I do svn status on the branch working copy it shows all the files that have changes that have not been merged back to the trunk yet. Of course, the purpose of my branch is to do these changes where they are not yet in the trunk.

What were they thinking when they did this?

I haven't found any usable information on what causes tree conflicts and how I can continue to work now that svn has created these things.

Is there a way to tell svn to forget about tree conflicts and just do the merge like it used to?

I'm using a 1.6 client and an older svn server (probably 1.3.1).

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

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

发布评论

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

评论(4

沫尐诺 2024-08-05 04:26:24

问题原来是我选择了parent/目录作为合并源而不是parent/trunk/目录。 这是用户错误,但树冲突消息令人困惑。 如果 svn 直接完成合并,我会立即看到问题。

树冲突引入了新的消息语义,需要一些时间来适应。

感谢您指向有关树冲突的 Tortoise 文档的指针。 这是我见过的唯一解决分支工作的文档。 然而,给出的示例并不能解释为什么我在分支上修改的文件上出现树冲突。 树冲突消息需要一些时间来适应。

在大多数情况下,您所做的似乎只是将树冲突标记为已解决,而在这些情况下,树冲突看起来只是噪音。

Mark Phippard 表示较旧的服务器版本不会导致树冲突。 仅当您需要合并跟踪支持并且您的服务器是 1.5 之前的版本时,才需要更新服务器。 显然,合并跟踪是旧 svn 服务器唯一缺少的东西:

http://eclipse.open.collab.net/ds/viewMessage.do?dsForumId=62&dsMessageId=332448

The problem turned out to be that I had chosen the parent/ directory as the source of the merge instead of the parent/trunk/ directory. It was user error, but the tree conflict message is confusing. If svn had just gone ahead and done the merge I would have seen the problem instantly.

Tree conflicts have introduced new message semantics that will take some getting used to.

Thanks for the pointer to the Tortoise documentation on Tree Conflicts. It is the only documentation I've seen that addresses working on branches. The example given doesn't explain why I got tree conflicts on the files I had modified on the branch, however. The tree conflict messages are going to take some getting used to.

It looks like all you do in most cases is mark the tree conflicts resolved, and in these cases it looks like tree conflicts are just noise.

Mark Phippard says that an older server version won't cause tree conflicts. The server only needs to be updated if you want merge tracking support and your server is pre-1.5. Apparently merge tracking is the only thing missing from older svn servers:

http://eclipse.open.collab.net/ds/viewMessage.do?dsForumId=62&dsMessageId=332448
凉墨 2024-08-05 04:26:24

svn:尝试添加已存在的树冲突

Subversion 正在抱怨,因为在您进行了产生冲突的合并之后,您又再次进行了相同的合并。 SVN 尝试添加冲突,但注意到先前的合并操作已经创建了冲突。 所以它正确地输出警告。

如果您执行合并操作并且对结果不满意,那么在尝试其他操作之前,您应该首先恢复本地更改。

至于原始树冲突:要了解为什么行为与旧客户端不同以及如何解决此类冲突,您必须阅读 svn 书中有关树冲突的部分。 tortoiseSVN 手册还有一个很好的 主题树冲突

svn: Attempt to add tree conflict that already exists

Subversion is complaining because after you did a merge which generated a conflict, you then did the same merge again. SVN tried to add a conflict but noticed that the conflict has already been created by the previous merge operation. So it correctly outputs a warning.

If you do a merge operation and you are not happy with the result, then before trying something else you should first revert the local changes.

As for the original tree conflict: to understand why the behaviour is different from the older clients and how to resolve such conflicts, you must read the section on tree conflicts in the svn book. The tortoiseSVN manual also has a good topic on tree conflicts.

も让我眼熟你 2024-08-05 04:26:24

我大胆猜测您正在观察 1.6 客户端和 1.3 服务器之间的不良交互。
树冲突检测是1.6的新特性。 此外,合并支持在 1.5 中已更改(并且变得更加可用)。

我会尝试将服务器和存储库格式升级到 1.6,另一件事是使用 1.5(没有树冲突)或 1.4(也没有新的合并)客户端。

再说一遍,这都是猜测,可能并没有真正的用处......

I have a wild guess that you are observing a bad interaction between the 1.6 client and the 1.3 server.
The tree conflict detection is a new feature of 1.6. Also, the merge support has been changed at 1.5 (and made much more usable then).

I'd try upgrading the server and repo format to 1.6, another thing to try is to use a 1.5 (no tree conflicts) or a 1.4 (and no new merge neither) client.

Again, this is all a guess and might not be really useful...

明月夜 2024-08-05 04:26:24

嘿伙计们,当我尝试进行 svn 合并时,我遇到了完全相同的问题,树冲突。 事实证明劳瑞纳斯是绝对正确的。 发生这种情况是因为 svn 存储库是旧版本。 在服务器上,我进入目录 {repopath}\db\format 并在格式文件中包含“2”。

我所做的只是做了一个

svnadmin upgrade {repopath}

非常轻松的事情。

这样做之后,当我尝试使用合并跟踪时,我没有再遇到任何树冲突! 谢谢你的提示!

Hey Guys I had exactly the same issue, tree conflicts when I was trying to do a svn merge. It turns out Laurynas was absolutely correct. It was occurring because the svn repository was an old version. On the server I went into the directory {repopath}\db\format and inside the format file it contained "2".

All I did was do a

svnadmin upgrade {repopath}

which was pretty painless.

After I did that, when I tried to use merge tracking, I didn't get any more tree conflicts! Thanks for the tip!

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