SVN - 两个仓库的合并历史 [英] SVN - Merge history of two repos

查看:51
本文介绍了SVN - 两个仓库的合并历史的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们将一些代码从一个 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.

  1. svnadmin dump oldrepo > repo1.dump
  2. svnadmin dump --incremental -r2:MAXREV newrepo > repo2.dump
  3. svnadmin 创建第三个仓库
  4. svnadmin 加载第三个仓库
  5. repo1.dump
  6. svnadmin 加载第三个仓库
  7. repo2.dump
  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

其中 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆