2013-07-07 210 views
0

我已經看過svnmerge和定期SVN,但說明無論是指合併分支到主幹,或步驟不同的我怎麼合併兩個顛覆分支(合併分支7.3至RC分支)

這裏是我的做,只要svnmerge.py有關

mkdir MERGE 
cd MERGE 
svn co https://svn.hq.cod.corp/co/perlapp/branches/RC 
cd RC-MOVEAPRIL13-1 
svnmerge.py init 

cd .. 
svnmerge merge https://svn.hq.co.corp/co/perlapp/branches/7.3 
Nothing happened 

then: 
cd MERGE/RC 
svn merge -S https://svn.hq.co.corp/co/perlapp/branches/7.3 

現在,我怎麼知道如果7.3確實合併?它發生得非常快,所以我認爲沒有任何事情發生。

一些建議有一個臨時RC分支,併合併到臨時RC分支,而不是真正的目標RC分支。

的另一種方式,似乎是:

$ svn co https://svn.hq.cod.corp/co/perlapp/branches/RC 
$ cd RC 
$ svn merge --ignore-ancestry https://svn.hq.cod.corp/co/perlapp/branches/RC https://svn.hq.co.corp/co/perlapp/branches/7.3 . 
# Check the diff to see if it merged properly 
$ svn diff | less 

沒有嘗試

也:

SVN合併-dry運行-r 221381:259009 https://svn.hq.co.corp/co/perlapp/branches/7.3https://svn.hq.cod.corp/co/perlapp/branches/RC給出了錯誤:

svn:試試'svn help'獲取更多信息 svn:無法用兩個URL指定修訂範圍

牢記我要合併「7.3」分支,以「RC」科,以最終結果爲RC包含所有承諾「7.3」

SVN信息網址:

[email protected]:/media/Hitachi/3/SVN-MERGE-7.3_to_RC/RC$ 
[email protected]:/media/Hitachi/3/SVN-MERGE-7.3_to_RC/RC$ svn info https://svn.hq.co.corp/co/perlapp/branches/build_7.3 
Path: build_7.3 
URL: https://svn.hq.co.corp/co/perlapp/branches/build_7.3 
Repository Root: https://svn.hq.co.corp/co 
Repository UUID: 1a64bf25-e0e5-0310-b6f3-de1d3c99dda3 
Revision: 259054 
Node Kind: directory 
Last Changed Author: mk 
Last Changed Rev: 259009 
Last Changed Date: 2013-07-05 11:45:26 -0400 (Fri, 05 Jul 2013) 

[email protected]:/media/Hitachi/3/SVN-MERGE-7.3_to_RC/RC$ svn info https://svn.hq.co.corp/co/perlapp/branches/RC 
Path: RC 
URL: https://svn.hq.co.corp/co/perlapp/branches/RC 
Repository Root: https://svn.hq.co.corp/co 
Repository UUID: 1a64bf25-e0e5-0310-b6f3-de1d3c99dda3 
Revision: 259054 
Node Kind: directory 
Last Changed Author: jc 
Last Changed Rev: 259052 
Last Changed Date: 2013-07-08 06:58:02 -0400 (Mon, 08 Jul 2013) 

[email protected]:/media/Hitachi/3/SVN-MERGE-7.3_to_RC/RC$ svn merge --dry-run http://svn.hq.co.corp/co/perlapp/branches/build_7.3 
svn: 'https://svn.hq.co.corp/co/perlapp/branches/RC' isn't in the same repository as 'http://svn.hq.co.corp/co' 
+0

的UUID兩個節點是一樣的,我現在不知道,爲什麼你得到「不在同一個存儲庫」。我會舉手 –

回答

0
  1. 你必須使用普通合併(從svn help merge 1-ST形式)
  2. 我不知道-S選項任何合併

常見的模式

mkdir RC 
cd RC 
svn co https://svn.hq.cod.corp/co/perlapp/branches/RC 
svn merge --dry-run https://svn.hq.co.corp/co/perlapp/branches/7.3 

(檢查的結果,在「樹衝突」的情況下,有更多的思考解決的問題,在「衝突」的情況下作出預合併選擇的正確版本或在圖形用戶界面的風格與合併解決衝突的視覺合併)

和...

svn merge https://svn.hq.co.corp/co/perlapp/branches/7.3 
+0

只是想確認一下,如果這種模式將合併所有版本從7.3到RC(這就是我的意圖),是否也可以使用svnmerge.py來跟蹤跨分支的合併? – kamal

+0

@kamal - 是,「同步合併」合併分支中的所有修訂(或者在最新的合併點之後,如果Subversion使用mergeinfo />=1.6/)。合併跟蹤可以以更原生的方式執行,請閱讀'svn help mergeinfo' –

+0

svn merge --dry-run http://svn.hq.co.corp/co/perlapp/branches/build_7.3,給我: svn:'https://svn.hq.co.corp/co/perlapp/branches/RC'與'http://svn.hq.co.corp/co'不在同一個存儲庫中' – kamal