SVN 迁移指定目录

What can it do for us:
Migrate a single project from a specify repository to a new svn repository and keep all commit history/Log.

E.g.
This is the layout of old svn server

1
2
3
4
5
6
7
8
9
10
11
/
repos/
DL/
trunk/
branches/
tags/
Some other projects...
Xotix/
trunk/
branches/
tags/

And this is the layout of our new svn server

1
2
3
4
5
6
7
8
9
/
repos/
ProjectA/
trunk/
branches/
tags/
Some other projects...
EMRepos/
<new empty repository>

Our task is migrate Xotix to new sver server, and it’s better to separate with other team projects.
Here are the cmds what we need:

  1. Backup the old repository base on the reversion number of target project (NOTE: the result dump file can NOT be loaded to new svn repository directly)

    1
    svnadmin dump D:\Repositories\repos > D:\35860.dump
  2. Filter target project (NOTE: the path is case sensitive, and the ‘/‘ is also improtent)

    1
    svndumpfilter include /Xotix /Xotix/trunk /Xotix/branches /Xotix/tags < 35860.dump > Xotix.dump
  3. Load project to new svn repository

    1
    svnadmin load D:\Repositories\EMRepos < Xotix.dump

For more info about the cmd, you can refer to this link:
http://svnbook.red-bean.com/en/1.8/svn.reposadmin.maint.html

本文参考:https://blog.csdn.net/jswxharry/article/details/41844395