Making subversion your b*tch

Posted by Jake Good
on Apr 12, 06

Most of you know that I’m a huge supporter of subversion. Well, at least those who read the geektacular articles…



Here comes another. This article will focus on one aspect of subversion that will help when using more than one project / repository that makes up your project.



The easy example, you have a Typo blog with the Brighthouse theme and when you want to update using subversion (svn update), you want them both to be updated.



The concept is simple, use svn:externals. It’s a property for subversion that allows you to point sections of your svn managed directory to other repository locations. The only caveat about doing things this way is that commits have to be done separately still. This will only work for checkouts and updates.



So how do you do it? Edit the svn:externals property for the directory to point to the location.



Here’s the application in our example.




[.]$svn checkout svn://typosphere.org/typo/trunk typoroot

[.]$cd typoroot

[typoroot]$cd themes

[typoroot hemes]$svn propedit svn:externals .
brighthouse http://www.height1percent.com/svn/brighthouse/brighthouse

[typoroot hemes]$cd ..

[typoroot]$svn update


This will cause typo AND brighthouse to update itself.



There we go, now subversion is behaving properly… and you are now that much more lazy!

Comments

Leave a response

Comment