2016-09-14 58 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.