Subscribe to RSS Feed
Twitter
HIRE ME! home  archives  about  blogroll

svn,externals.

22 Aug 2006

Subversion Externals Definitions, yet another nice Subversion feature.

In our rails app we make use of the engines and more specific the login_engine, plugins. Now, if you follow the rails-news a bit you’ve probably heard of the security issue not so long ago.

These patches (and 1.1.6) will break applications using the 3rd party engines idea.

I can tell you for sure, it was broken. When I started building the app I downloaded and extracted the engines in the plugins directory, so I had no idea (anymore) which version we were using at that time.

svn:externals to the rescue

I knew about externals from typo, but I never really looked into it. Until now.

An externals definition is a mapping of a local directory to the URL—and possibly a particular revision—of a versioned resource. [more]

Externals? Cool. How?

svn propedit --editor-cmd gvim svn:externals vendor/plugins

The line above fires up gvim where I entered the following lines:

engines http://svn.rails-engines.org/plugins/engines
login_engine http://svn.rails-engines.org/plugins/login_engine

This will ensure that we always have the latest version of the plugins whenever we run svn up. So now we follow engines-trunk for a while, until we decide to link to a particular version. We then only have to modify the svn urls accordingly.

blog comments powered by Disqus