分类: LINUX
2011-03-17 10:33:26
SVN迁移,SVN分拆,合并目录
1.导出整个库的内容
svnadmin dump /var/svn/repo1 > repo1.dump
2.过滤出要导出的目录
cat repo1.dump | svndumpfilter include /subdir1/subdir11> subdir1.dump
3.导入到新库中
下降目录
svnadmin load /var/svn/repo2 --parent-dir /subdir2/subdir21 < subdir1.dump
上升目录
sed -e "s@^\(Node-path: \|Node-copyfrom-path: \)subdir1/@\1@" subdir1.dump > subdir1.dump.fixed
svnadmin load /var/svn/repo2 < subdir1.dump.fixed