在 Subversion 中将主干合并到分支 [英] Merge trunk to branch in Subversion
问题描述
我使用的是 Subversion 1.4.6,我现在无法升级到 1.5 版.
I'm using Subversion 1.4.6, and I cannot upgrade to version 1.5 right now.
情况:
主干有很多结构上的变化(例如,主要是移动文件).
The trunk has a lot of structural changes (i.e. moving files around, mostly).
我最近从主干合并了一个分支,但在进行重大更改之前.
I have a branch that was recently merged from the trunk, but before the major changes.
将主干合并到分支的最佳方法是什么?
What is the best way to merge the trunk to the branch?
我的想法:
首先小心地将分支合并到主干,只将分支中修改过的文件合并到主干中.
First carefully merge the branch to the trunk, by merging only the modified files in the branch to the trunk.
将主干复制到分支.在不丢失分支历史记录的情况下执行此操作的最佳方法是什么?我应该弃用分支并创建一个新分支吗?
Copy the trunk to the branch. What is the best way to do this without losing the branch history? Should I deprecate the branch and create a new one?
好吧,看来我没有给予 SVN 足够的信任.毕竟已经够聪明了.我只是被D"和A"的输出推迟了,但在后台它做了一个动作.
Okay, it looks like I didn't given SVN enough credit. It's smart enough after all. I was just put off by the output of "D" and "A", but in the background it did a move.
推荐答案
自上次合并以来,是否存在阻止您合并主干上所有修订的问题?
Is there something that prevents you from merging all revisions on trunk since the last merge?
svn merge -rLastRevisionMergedFromTrunkToBranch:HEAD url/of/trunk path/to/branch/wc
应该可以正常工作.至少如果您想将主干上的所有更改合并到您的分支.
should work just fine. At least if you want to merge all changes on trunk to your branch.
这篇关于在 Subversion 中将主干合并到分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!