Quick and Dirty SVN Syncing Between Un-identical Repositories

This probably isn’t useful for many people, but I just figured this out and it’s quite useful for my work:

I work with several different Subversion repositories. Recently we’ve set up a new repository for one of my clients but previously the code was in my personal repository, which also has some other projects in it. Of course, me having several projects in my personal repository is not recommended practice and in cases like this, I can see why: it means I had to do this whole silly process, instead of something simple like svn switch --relocate. But the damage is done, so I had to figure out how to deal with it. This was my quick and dirty solution to syncing branches with identical structures while coming from un-identical repositories:
svn export [up-to-date repository] code1
svn checkout [out-of-date repository] code2

Now I have the new, ‘clean’ (ie not revision controlled) code in code1 and the old, revision controlled code in code2. I want to just drop everything from code1 into code2. Worried about over-writing .svn files if I did a simple copy in OS X, I instead FTPed into my own computer (ie to localhost) and then just dropped everything in the code1 directory into code2. Then it was a simple matter of running svn update and svn commit and my old, personal repository is now up to date.

Tags: , , , , , ,

Leave a Reply