比方說,我們在資源庫中的以下兩個目錄:在顛覆與另一個目錄拷貝更換目錄
currentproduction
development
而且我想:
- 重命名
currentproduction
到例如archivedproduction
。 - 複製修訂
development
爲(新)currentproduction
1234。
當我做
svn ren currentproduction archivedproduction
svn copy -r 1234 development currentproduction
顛覆嘗試複製development
下(進)currentproduction
(這是已經預定要刪除):
A currentproduction\development\file1.txt
A currentproduction\development\file2.txt
Updated to revision 1234.
svn: Can't add 'currentproduction\development' to a parent directory scheduled for deletion
我想這是因爲目錄仍然在工作副本中,直到提交。我可以做中間承諾:
svn ren currentproduction archivedproduction
svn commit
svn copy -r 1234 development currentproduction
但是這不是很好......是不是有沒有辦法告訴Subversion我想替換用另一個目錄?
是的,這是一種可能性;然而,它增加了複雜性和可能的合併衝突,對我而言無益(在我的情況下)。而且,我確實使用了提到的設置,這是一個簡化的例子。 ;-)儘管這不是我所需要的,但我現在可以接受的答案是我現在所希望的最好的答案。 :-)(我幾乎成功地通過手工編輯.svn文件來做我想要的東西,我將在業餘時間嘗試更多一些。) – Mormegil 2011-03-29 10:06:10