Skip to main content
Enterprise Agile Planning Image

This post is from the CollabNet VersionOne blog and has not been updated since the original publish date.

Last Updated Mar 06, 2011 — Enterprise Agile Planning expert

Usage of SVN Externals

Enterprise Agile Planning

How do people typically create dependencies using Subversion?

Here are some guidelines:

  • Avoid copying common code; for example, you don’t want JBoss in every java project
  • Be able to easily reference a “pegged” revision of the code.  For example, your project may specifically require version 3_2_6 of JBoss
  • Be able to track the “bleeding edge” of some dependencies, for example, you may want to always stay current on the spring framework you use

A common strategy for dealing with this situation in Subversion is something called the “externals”.  The externals in Subversion could be  a link to another subversion repository.

Since all Subversion repositories are identified by URL, it is easy to construct a reference to an external source.

Externals make use of another feature of Subversion, the property.

Properties are simply name/value pairs.  An example might make this clearer.

Suppose your development project has the following structure:

/branches

/tags

/trunk/j2eeapplication

/trunk/thirdparty

And our development project component uses JBoss.  We are required to use the latest version of gddwebapps but gddwebapps has specific dependencies on JBoss 3_2_6

And further suppose our development group has setup a repository containing versions of gddwebapps component at this URL:

https://myproject.collab.net/svn/repos/gddwebapps

And the JBoss 3_2_6 is located in another SVN repository

https://myproject.collab.net/svn/repos/jbossserver

Using the setup below, one would set the built-in subversion property, svn:externals on the /trunk/thirdparty directory.

https://myproject.collab.net/svn/repos/gddwebapps/trunk/thirdparty

This property would have this value:

JBoss3_2_6 https://myproject.collab.net/svn/repos/jbossserver

So how would you set this up?

Here is a “How To” example:

Step 1:

cd to …gddwebapptrunkthirdparty directory

Step 2:

svn propset  svn:externals “JBoss 3_2_6

https://myproject.collab.net/svn/repos/jbossserver/JBoss_3_2_6”  .

Step 3:  svn commit

Step 4:  svn update

(This will fetch external item into ‘JBoss 3_2_6’)

JBoss_3_2_6 now appears  in the ../gddwebapp/trunk folder (workspace) as illustrated in Figure A.

Figure A




Upon branching i.e. creating a nick_devel branch, external JBoss_3_2_6  appears in the nick_devel workspace as illustrated below in Figures B and C.

Figure B


Figure C


More from the Blog

View more
Jul 27, 2021

Digital.ai Becomes First to Achieve FedRAMP Moderate “In Process” Status for Enterprise Agile Planning Solution

Enterprise Agile Planning
Digital.ai, the leading AI-driven DevOps value stream delivery, and ma ...
Read More
Jun 21, 2021

How Agile can be implemented effectively across the organization

Enterprise Agile Planning
Just a few decades ago, a “disruption” was seen as an undesirable thin ...
Read More
May 31, 2021

Agile change management processes are key to delivering software faster

Enterprise Agile Planning
With its emphasis on delivery value faster, agile product management s ...
Read More
May 03, 2021

Bringing the agile planning approach to your whole business

Enterprise Agile Planning
The events of the last 12 months have demonstrated that the only sure ...
Read More
Contact Us