v1.6 中的 Subversion 分支重新集成 [英] Subversion branch reintegration in v1.6

查看:18
本文介绍了v1.6 中的 Subversion 分支重新集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据 这个老问题,使用 SVN 1.5,多次重新集成一个分支是有问题的,应该避免.

Per this old question, using SVN 1.5, reintegrating a branch multiple times is problematic, and should be avoided.

有一些声音说,这是一个已知问题,应该在 SVN 1.6 中修复."是这样吗?是固定的吗?我可以多次重新整合吗?

There has been some rumbling to the effect that, "This is a known issue, and should be fixed in SVN 1.6." Was that the case? Is it fixed? Can I reintegrate multiple times?

推荐答案

将一个分支topic重复合并到主干:在每次合并时执行以下操作.

  1. svn merge --reintegrate <trunk>,就像你平时那样.(=>rM)
  2. svn merge --record-only -c M ^/<主题>.注意仅记录选项.
  1. svn merge --reintegrate <topic> <trunk>, as you would normally. (=> rM)
  2. svn merge --record-only -c M ^/<trunk> <topic>. Note the record-only option.

步骤 2 实质上告诉主题分支考虑其历史记录中的合并提交(修订版 M,来自步骤 1).这种合并修订通常会在重新集成期间引起问题;svn 在第二次集成 topic 时尝试撤消 rM.

Step 2 essentially tells the topic branch to consider the merge commit (revision M, from step 1) part of its history. This merge-revision is the one that usually causes problems during reintegration; svn tries to undo rM when integrating topic a second time.

所以,反复重新整合是有效的,只是不会自动进行.:)

So, repeated reintegration works, just not automatically. :)

我最终通过对svn源的启发性提交消息找到了这个解决方案 和匹配的 测试(搜索def multiple_reintegrates").这是 svn-devs 在当前版本中发现并使用的聪明技巧".它甚至被添加到 最近文档.结果仍然不如 DVCS 的合并属性好,但至少是功能性的.

I eventually found this solution through an enlightening commit message to the svn source and the matching test (search for "def multiple_reintegrates"). This is a "clever trick" discovered and used by svn-devs with the current releases. It's even been added to more recent documentation. The result is still not as good as a DVCS's merging properties, but it's at least functional.

唯一的普遍缺点(根据 未决问题截至2010 年 6 月 2 日)显然 svn log -g 输出很混乱.我想这就是风险.

The only broad downside (as per an open issue as of June 2, 2010) is that apparently the svn log -g output is messy. I guess this is the risk.

这篇关于v1.6 中的 Subversion 分支重新集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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