A Cool Subversion Trick

by Brian on 4/5/2007

Here’s a cool trick with Subversion that I discovered today. Lets say you use an open source program, for my example I’ll use Asterisk, and you like to make your own custom changes to the source, or even a simple change to the Makefile. Now lets say that after you make your changes, a critical security fix was released. So, do you download the new tar file and manually re-apply your changes? No, use subversion!

For example:

1. Check out a stable version of the source code:
$ svn checkout http://svn.digium.com/svn/asterisk/tags/1.2.17 asterisk-stable

2. Make your changes to the source. If you want, you can optionally create a patch file for your own personal reference, or perhaps to share with others, or even better, to submit improvements to the project:
$ svn diff > mypatchfile.patch

3. When a new security fix is released, do something like this:
$ cd asterisk-stable
$ svn switch http://svn.digium.com/svn/asterisk/tags/1.2.18
$ svn update

4. Rebuild and install your updated program!

Related posts:

  1. Back in the Day
  2. Mark Spencer’s Brithday
  3. Ruby 1.9 Released
  4. Shortcut for Adding Multiple New Files to a Subversion Repository
  5. It’s cool when…

Previous post:

Next post: