v1.6中的Subversion分支重新集成 [英] Subversion branch reintegration in v1.6
问题描述
对于每个这个老问题,使用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 重复合并到主干中:在每次合并中执行以下
-
svn merge --reintegrate <topic> <trunk>
,就像通常那样. (=> r
M
) -
svn merge --record-only -c M ^/<trunk> <topic>
. 注意record-only
选项.
svn merge --reintegrate <topic> <trunk>
, as you would normally. (=> r
M
)svn merge --record-only -c M ^/<trunk> <topic>
. Note therecord-only
option.
步骤2本质上告诉主题分支考虑合并历史记录的一部分(来自步骤1的修订 M
).这种合并修订通常会在重新集成过程中引起问题. 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屋!