SVN externals in RapidSVN

Tuesday, 07 Apr 2009
SVN Externals provide a way to "allow parts of other repositories to be automatically checked-out into a sub-directory". This is useful when you want to use shared libraries that are in SVN themselves.

However, RapidSVN does not provide a "Add SVN external..." button (nor does TortoiseSVN by the way). So I was wondering... how would I do this?

Turns out that SVN externals are actually properties of a parent folder (thanks for the help). For example, consider the following structure:
site/
site/js/
and assume I would want to include a shared javascript library in site/js/lib/. I would now have to edit the properties of the SVN folder site/js/ and add the following:
Property Value
svn:externals lib https://svn/js/lib

It is interesting to note here that you can specify multiple externals by simply putting them on multiple lines:
Property Value
svn:externals lib https://svn/js/lib
moo https://svn/js/mootools_classes

also pay attention that in order to update your local copy with the external files, you first need to commit the property change to the repository before it will do that.

As a result, there will be a gray folder in your respository, with its status set to external.
Posted in: svn
Add comment

Comments (1)

07-05-2010, 12:59
Nick Leverton
Thanks for the info. I wish rapidsvn made it more easy and direct to create externals, and depths, and all the good stuff that's been added to svn over the last few major releases.

In the property values though, you have the URL and object name the wrong way round. The svn:externals property should be something like:

https://svn/js/lib lib

Note also you can now use ^ as a repo name in most places in subversion, e.g. if the repo URL is https://svn/, you can set svn:externals to

^/js/lib lib