开发者

SVN - Merge history of two repos

We migrated some code from one SVN repo to other without keeping the history.

Is it possible to merge the history of both old a开发者_Python百科nd new repos?

Thanks, Michael


If there is no overlap between the histories in the old repo and the new repo, you could merge them into a third repo.

  1. svnadmin dump oldrepo > repo1.dump
  2. svnadmin dump --incremental -r2:MAXREV newrepo > repo2.dump
  3. svnadmin create thirdrepo
  4. svnadmin load thirdrepo < repo1.dump
  5. svnadmin load thirdrepo < repo2.dump

where MAXREV is the youngest revision in your new repo, and 2 represents the second revision in your new repo, assuming that the 1st revision was the import. The incremental flag is necessary to avoid Subversion trying to "add" all the files again.

See http://svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html#svn.reposadmin.maint.migrate

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜