svn:externals

This relatively unknown feature of subversion allows you to include one subversion repository URL inside another. By that I don't mean export and add, rather svn:externals allows you to create a virtual directory that links to an external repository.

I'm sure there are plenty of other uses but I mostly use svn:externals for adding plugins to my rails projects. For example, if you wanted to link to the Foreign Key Migrations plugin, from inside your rails project directory you would type:

simon$ svn propedit svn:externals vendor/plugins/

Then add the following lines:

foreign_key_migrations svn://rubyforge.org//var/svn/redhillonrails/trunk/vendor/plugins/foreign_key_migrations
schema_defining svn://rubyforge.org//var/svn/redhillonrails/trunk/vendor/plugins/schema_defining

And voila! Now when you update your project you'll see something like:

simon$ svn up 

Fetching external item into 'vendor/plugins/foreign_key_migrations'
External at revision 25.


Fetching external item into 'vendor/plugins/schema_defining'
External at revision 25.

At revision 2533.
simon$

Notice how subversion updates the virtual directories as well.

Be aware though that this does mean you'll always get the latest code when you update. This is exactly what I want but may not suitable on all projects. Sometimes a simple svn export is more appropriate.

We're currently toying with the possibility of using svn:externals to share common code between some projects that are presently all in one big code-soup project but will be split up over the next couple of months. I'll let you know what we decide to do in the end.

Introducing Squishr

My buddy Ryan and I spend a lot of time discussing music. In fact, I tend to spend a lot of time discussing music with everyone I know. Unfortunately, I don't really have as much time as I would like to figure out what to listen to anymore. My friends who had college radio shows have all moved on to real jobs, and no one really has time to explore all of the new stuff coming out. So one day I sat down with my friend Ryan and we asked ourselves, "how can we figure out what music to listen to?"

The obvious answer, of course, was the magic of the internet. Surely, somewhere on the internet there must be something that can help us figure out what to listen to.

Nope. Nothing. At least nothing good enough for us.

So today we've rolled out an open alpha of our music site Squishr, the first thing out of our little company, Ten Ton Labs. It picks up music reviews from all over the web and aggregates them together to try to figure out an overall score for the music. Then it lets people add their own reviews if they don't like what the professional reviewers are saying about things. Plus it gives you all sorts of other data about the music and artists, links back to wikipedia about things, and all sorts of other little features that we're throwing in as we go. It's still pretty rough around the edges, but we tend to like it quite a bit so far. Check it out, and let me know what you think.