Friday, 17 July 2009

Using externals with SVN

UPDATE: You need to specify the directory you want to create when setting the external property. No need to create the dir before propset: it'll be done automatically when you 'svn up'.


- Create somewhere in the SVN repo the directory you want to use as external (let's call it SVNEXTURL)
- Go in the working copy where you want to have an external reference and:

svn propset svn:externals 'newlocaldir SVNEXTYURL' .

where newlocaldir is the name of the directory being created by SVN during this operation.
Quotes are needed.
Note the '.'

- and then
svn up

Enjoy!

Problem: if you're using a version of svn-buildpackage older than 0.6.24 (debian), it won't work with external references. You can upgrade to >= 0.6.24 or apply locally the patch described here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=363003

No comments:

Post a Comment