Michael D.
Michael D.

Reputation: 1319

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 and new repos?

Thanks, Michael

Upvotes: 2

Views: 548

Answers (1)

Eero
Eero

Reputation: 4754

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

Upvotes: 4

Related Questions