2016-09-14 57 views
-2

将分支代码合并到主干时出现问题乌龟SVN分支必须与主干祖先相关

应该怎么做才能真正避免该问题?

+0

的庸俗答案是合并一个分支,是祖先相关的躯干。现实情况是SVN对共同祖先的处理很差,所以你仍然可以选择合并一个'from'和'to'修订版,然后它不会关心共同祖先的位置(或不是) –

+0

@保罗 - 你能回答这个问题吗?你指的是哪种类型的合并?它完全有效吗? – dpen82

+0

不幸的模糊问题会得到模糊的答案。每次工作的是“2-URL合并”。如果你使用的是命令行,那么输入“svn help merge”,它会解释这个过程。如果你正在使用乌龟,那么你需要选择“合并两棵不同的树”来查看这个选项。 –

回答

1

从在我的评论中讨论的documenation:

This form is called a '2-URL merge': 

svn merge SOURCE1[@REV1] SOURCE2[@REV2] [TARGET_WCPATH] 

You should use this merge variant only if the other variants do not 
apply to your situation, as this variant can be quite complex to 
master. 

Two source URLs are specified, identifying two trees on the same 
branch or on different branches. The trees are compared and the 
difference from [email protected] to [email protected] is applied to the 
working copy of the target branch at TARGET_WCPATH. The target 
branch may be the same as one or both sources, or different again. 
The three branches involved can be completely unrelated. 

TARGET_WCPATH is a working copy path; if omitted, '.' is generally 
assumed. The special cases noted above in the 'complete' merge form 
also apply here. 

SOURCE1 and/or SOURCE2 can also be specified as a working copy path, 
in which case the merge source URL is derived from the working copy.