SVN - Merge history of two repos

99封情书 提交于 2020-01-01 18:43:49

问题


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

Is it possible to merge the history of both old and new repos?

Thanks, Michael


回答1:


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



来源:https://stackoverflow.com/questions/4432981/svn-merge-history-of-two-repos

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!