Let’s say you wanted to transfer a complete copy of an existing SVN repository, all history included, from a googlecode.com project to a subdirectory in another preexisting repository. This takes a few steps since us mere mortal non-googlers (and former googlers) don’t get direct command line access to the googlecode.com servers.
- Make a local copy of the full googlecode.com repository.
svnadmin create local_repos echo -e "#\041/bin/sh" > local_repos/hooks/pre-revprop-change echo "exit 0" >> local_repos/hooks/pre-revprop-change chmod 755 local_repos/hooks/pre-revprop-change svnsync init file://`pwd`/local_repos https://urproject.googlecode.com/svn svnsync sync file://`pwd`/local_repos
- Now, you can make a dump of that local repository.
svnadmin dump ./local_repos > thedump
- Copy that dumpfile over to wherever your preexisting destination repository is located. -C is for gzip compression during transfer, and is helpful if you have a big repository full of text.
scp -C ./thedump yourhost.com:~/
- Now, we load that dumpfile.
ssh yourhost.com svn mkdir file://path/to/your/repos/dir_for_googlecode_copy svnadmin load /path/to/your/repos --parent-dir dir_for_googlecode_copy < thedump
Revision number will be incremented correctly (ending at the sum of the two previous repositories), all the commit logs and such are transfered intact, including the authors (even if they’re not users on the new system). Pretty smooth.