views:

4054

answers:

3

Hi,

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.

+8  A: 

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.

mihi
This looks pretty close to my requirements.
John Gietzen
Is it not possible to do a simple `svnsync TOURL FROMURL`?
John Gietzen
The command line options are different, see http://linux.die.net/man/1/svnsync.And you have to create a (maybe empty) pre-revprop-change hook (or pre-revprop-change.bat if you are on Windows) first.
mihi
+1  A: 

The way to typically achieve this is the svnadmin dump command. If you don't have svnadmin access then I would ask the person that does if they can supply you with a dump. This will make the process of importing much easier as well.

Are you on a shared repository currently? This might make the person that owns the repository leary of giving you a dump, since it will be a copy of the entire repository, not just your piece of it.

Lee
Yeah, this would be a shared repository source. And that is why we can't get a dump.
John Gietzen
Perhaps you could convince the owner to provide you with a filtered dump, using svndumpfilter? See http://svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html#svn.reposadmin.maint.tk.svndumpfilter for more information.
markusk
looks like svnsync is almost the best way to go.
John Gietzen
A: 

@mihi response

New svnsync documentation link is now http://svn.apache.org/repos/asf/subversion/trunk/notes/svnsync.txt

Carlosfocker