reversing svn externals
May 23rd, 2007
Generally when you install a plugin in a Rails app that is under version control with subversion, it’s recommended you use the –x switch to export the plugin to your directory. The –x just uses the svn export command the svn externals definition. I’ve happily installed many a plugin this way. It’s a great way to stay up to date – if the plugin ever gets updated, the changes get pulled in with svn update.
Recently, I found myself wanting to do some cleanup on an app however, and I had a couple plugins in there that I tried out at some point but I wasn’t using any more. I tried to use svn rm vendor/plugins/plugin_x , and it appeared to work (showed those files as marked with a D) but it didn’t actually remove them. Or rather, it had removed them, but they came right back when I did svn update.
Now I love subversion, but I didn’t even know where to look to figure out how to unhook these external plugins from my app. Eventually I figured out I need to check on the svn properties of the plugin directory.
jason@jwl-dev:~/dev/rails_app$ svn proplist vendor/plugins/ Properties on 'vendor/plugins': svn:externals
Ah, there we go. Let’s see what’s actually set in the svn:externals property.
jason@jwl-dev:~/dev/rails_app$ svn propget svn:externals vendor/plugins/ acts_as_versioned http://svn.techno-weenie.net/projects/plugins/acts_as_versioned unwanted_plugin http://blahblahblah/plugins/unwanted_plugin
In order to remove the unwanted plugin, I just needed to use svn propedit svn:externals vendor/plugins and delete that line. After that, the unwanted plugin was no longer under version control and I could just delete the whole ‘unwanted_plugin’ directory (didn’t even have to use svn rm).
3 Responses to “reversing svn externals”
Sorry, comments are closed for this article.


May 23rd, 2007 at 01:36 PM
the -x switch sets up the external link.
svn export is something else entirely (similar to checkout, except the exported dir is not a working copy, no .svn dirs, thus no checking in changes or anything)
May 24th, 2007 at 01:07 PM
Oh, how embarrassing – you’re right, it’s nothing to do with export. Thanks sjs – I’ve corrected my posting.
May 24th, 2007 at 09:55 PM
hardly embarrassing! :)