svn replace repo

There is a project projectA in repoX (http://server/repoA/turnk/projectA), now you need to migrate projectA from repoX to repoY.

 

1. Dump projectA from repoX

svnrdump dump  http://server/repoX/turnk/projectA > projectA.dump

 2. Filter the dump file, remove the empty revision, and remove the /trunk directory

cat projectA.dump | svndumpfilter --drop-all-empty-revs --renumber-revs include  /trunk/projectA > projectA.dump.new

 3. Import into the new repoB

svnadmin load --bypass-prop-validation http://server/repoY < projectA.dump.new

 Problems encountered during the migration process,

  1. When #2 filters empty revisions, I don't know why, svndumpfilter will also filter out some non-empty revisions. You must use cat plus pipe character to correctly filter empty revisions.
  2. In #2 filtering, if the directory after inclde specifies "/" instead of "/trunk/projectA", the error "/trunk" aleady exists will be reported when #3 is imported.
  3. Before the formal import, you can use the command svnadmin create testRepo to create a local repo locally for testing. For example, if this command is executed in the /Users/shqu/svn directory, the SVN address of testRepo is file:///Users/shqu/svn/testRepo

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326610783&siteId=291194637
svn