导入SVN,要么存在文件,要么找不到文件错误

时间:2013-11-14 13:09:56

标签: svn svnadmin svndumpfilter

我已经像这样过滤了转储文件:

svndumpfilter include /config-tool/trunk < aps.dump > ct-filtered.dump

首先尝试创建repo和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 

第二次尝试,创建repo,只有folderA

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 

我已经阅读了很多有关此问题的主题,不太确定我错过了什么。

在转储本身,我确认路径存在:

Node-path: config-tool/trunk

1 个答案:

答案 0 :(得分:1)

根据您指定的第二个案例,以下内容将起作用:

请注意,我们正在创建folderA/config-tool,而不仅仅是folderA

  1. svndumpfilter include /config-tool/trunk < aps.dump > ct-filtered.dump
  2. svnadmin create myrepo
  3. svn mkdir file:///home/me/myrepo/folderA/config-tool --parents -m "Go"
  4. svnadmin load --parent-dir folderA myrepo < ct-filtered.dump