The blog of Rahoul Baruah from 3hv Ltd

What's going on?

My name is Rahoul Baruah (aka Baz) and I'm a software developer in Leeds (England).

This is a log of things I've discovered while writing software in Ruby on Rails. In other words, geek stuff.

However, I've decided to put this blog on ice - I would ask you to check out my business blog here (or subscribe here).

23 January, 2008

Moving changes from one subversion repository to another

I'm sure this is old hat to you svn experts but I've just figured it out.

If you need to transfer a load of changes from one subversion repository to another (or you have an external developer helping you out on your open source project who has submitted a patch) this is what you need to do:

Generate a Patch File



Move to your "source" working copy and run:

svn diff -r REV > my_patch.txt

This finds all changes since revision number REV and places them in my_patch.txt.

Apply a Patch File



Move to your "target" working copy and run:

patch -p0 < my_patch.txt

This applies all the changes in my_patch.txt to your target working copy. Running svn status then shows all the files that have changed - you can then review the changes before an svn commit (of course crediting your developer in the comments).

No comments:

eXTReMe Tracker