我想將文件夾從一個存儲庫移動到另一個存儲庫(當然,保留所有歷史記錄)。我跟着一些問題的答案的「How to move a single folder from one Subversion repository to another repository?」特別是,我嘗試的命令:加載存儲庫的轉儲部分不會產生任何影響
svnadmin.exe dump H:\Repositories\RepSource > W:\temp\RepSource.dump
svndumpfilter.exe include "trunk\Sources\folderToMove" --drop-empty-revs --renumber-revs --preserve-revprops <W:\temp\RepSource.dump> W:\temp\RepSource_filtered.dump
svnadmin.exe load "H:\Repositories\RepDest" < W:\temp\RepSource_filtered.dump
RepDest的是,我只是爲了測試創建了一個空庫。傾銷順利進行;根據輸出結果進行過濾,這表示所有文件夾都已丟棄,但是指定了一個。加載有一些問題;它具有輸出:
<<< Started new transaction, based on original revision 1 * editing path : trunk/Sources/folderToMove/theFile.mxml ...svnadmin: File not found: transaction '0-1', path 'trunk/Sources/folderToMove/theFile.mxml'
「theFile.mxml」是,是「folderToMove」文件夾內的文件。
我注意到一些神奇:當過濾流,我添加了一個反斜槓結束包括路徑:
svndumpfilter.exe include "trunk\Sources\folderToMove\" --drop-empty-revs --renumber-revs --preserve-revprops <W:\temp\RepSource.dump> W:\temp\ RepSource_filtered.dump
輸出如下:
<<< Started new transaction, based on original revision 1 ------- Committed revision 1 >>> <<< Started new transaction, based on original revision 2 ------- Committed revision 2 >>> <<< Started new transaction, based on original revision 3 ------- Committed revision 3 >>> <<< Started new transaction, based on original revision 4 ------- Committed revision 4 >>> <<< Started new transaction, based on original revision 5 ------- Committed revision 5 >>> <<< Started new transaction, based on original revision 6 ------- Committed revision 6 >>> <<< Started new transaction, based on original revision 7 ------- Committed revision 7 >>> <<< Started new transaction, based on original revision 8 ------- Committed revision 8 >>> <<< Started new transaction, based on original revision 9 ------- Committed revision 9 >>> <<< Started new transaction, based on original revision 10 ------- Committed revision 10 >>> <<< Started new transaction, based on original revision 11 ------- Committed revision 11 >>> <<< Started new transaction, based on original revision 12 ------- Committed revision 12 >>> <<< Started new transaction, based on original revision 13 ------- Committed revision 13 >>> <<< Started new transaction, based on original revision 14 ------- Committed revision 14 >>> <<< Started new transaction, based on original revision 15 ------- Committed revision 15 >>>
似乎但是當我查看RepDest存儲庫(使用TortoiseSVN-> Repo Browser或VisualSVN服務器管理器)時,其中沒有任何內容。它保持空着。 HEAD修訂版本號是0。但是,如果我看着這個倉庫有:
svnlook tree H:\Repositories\RepDest -r 5
我再次看空庫,但它承認版本號。所有版本號從1到15都正確處理。對於測試,「-r 16」會導致svnlook向我表示此修訂不存在。
我也檢查了RepDest存儲庫文件夾的大小 - 加載之前和之後都是一樣的。
這裏有什麼問題?有任何想法嗎 ?
此外,我注意到以下幾點: 只會出現此問題,如果「主幹的\ Sources \ folderToMove」包含的文件和子文件夾。如果它只包含文件,導入將會成功。 我試圖在包含選項中指定兩個子文件夾和文件用空格分隔,但我得到相同的結果「文件未找到」 – AntonAL 2009-12-27 12:30:04