我已经过滤了转储文件,如下所示:svndumpfilter include /config-tool/trunk < aps.dump > ct-filtered.dump
首先尝试创建回购和3个文件夹:
svnadmin create myrepo
svn mkdir file:///home/me/myrepo/folderA file:///home/me/myrepo/folderA/config-tool file:///home/me/myrepo/folderA/config-tool/trunk -m "Go"
Committed revision 1.
svnadmin: File already exists: filesystem '/home/me/myrepo/db', transaction '12-c', path 'folderA/config-tool/trunk'
* adding path : folderA/config-tool/trunk
第二次尝试,仅创建存储库
svnadmin create myrepo
svn mkdir file:///home/me/myrepo/folderA -m "Go"
Committed revision 1.
svnadmin load --parent-dir folderA /home/me/myrepo < /home/me/ct-filtered.dump
svnadmin: File not found: transaction '12-c', path 'folderA/config-tool/trunk'
* adding path : folderA/config-tool/trunk
我已经在SO上阅读了很多关于此的主题,但不太确定我缺少什么。
在转储本身中,我确认存在路径:
Node-path: config-tool/trunk
最佳答案
根据您指定的第二种情况,以下将起作用:
请注意,我们正在创建folderA/config-tool
,而不仅仅是folderA
。svndumpfilter include /config-tool/trunk < aps.dump > ct-filtered.dump
svnadmin create myrepo
svn mkdir file:///home/me/myrepo/folderA/config-tool --parents -m "Go"
svnadmin load --parent-dir folderA myrepo < ct-filtered.dump