SVN - 两个仓库的合并历史 [英] SVN - Merge history of two repos
问题描述
我们将一些代码从一个 SVN 存储库迁移到另一个 SVN 存储库,而没有保留历史记录.
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?
谢谢,迈克尔
推荐答案
如果旧 repo 和新 repo 中的历史记录没有重叠,您可以将它们合并到第三个 repo.
If there is no overlap between the histories in the old repo and the new repo, you could merge them into a third repo.
- svnadmin dump oldrepo > repo1.dump
- svnadmin dump --incremental -r2:MAXREV newrepo > repo2.dump
- svnadmin 创建第三个仓库
- svnadmin 加载第三个仓库
- repo1.dump
- svnadmin 加载第三个仓库
- repo2.dump
- svnadmin dump oldrepo > repo1.dump
- svnadmin dump --incremental -r2:MAXREV newrepo > repo2.dump
- svnadmin create thirdrepo
- svnadmin load thirdrepo < repo1.dump
- svnadmin load thirdrepo < repo2.dump
其中 MAXREV 是新存储库中最年轻的修订版,2 表示新存储库中的第二个修订版,假设第一个修订版是导入.增量标志是必要的,以避免 Subversion 再次尝试添加"所有文件.
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.
参见 http:///svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html#svn.reposadmin.maint.migrate
这篇关于SVN - 两个仓库的合并历史的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!