Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN copy between repositories with history

One of my teammates has asked if it is possible to export from one SVN to another, all while maintaining history.

To me, this seems like it would be a common request.

So: Is it possible to migrate between SVN repositories all while maintaining history?

It is important to note that we do not have svnadmin access on the Source, but we do have that on the Destination.

If this comes down to just checking out each revision from the source, and checking it in to the destination, we would be OK with that, as long as there was an automated process for that.

EDIT: I forgot to mention that the destination repo is on windows.

like image 459
John Gietzen Avatar asked Jun 10 '09 16:06

John Gietzen


People also ask

Does SVN move preserve history?

If you right-drag the folder and use "SVN move versioned item(s) here", then you keep the history. Even the history of the files within the folder.


1 Answers

[Edit: The original reply below is from pre SVN 1.7, and there this was the best way to solve the problem (although it is not the primary use case of svnsync). In SVN 1.7 client or later there is the svnrdump tool that does more directly what you are trying to achieve)]


use svnsync to synchronize the source to the destination (needs admin access to the destination repository or at least a way to add hooks, but no special access to the source repository). If the destination already has revisions, sync the source to a temporary repository, and then use svn-merge-repos.pl to merge the two local repositories.

like image 89
mihi Avatar answered Sep 22 '22 05:09

mihi