Tip 18: SVN Externals
Many of us use multiple SVN repositories and manage them separately. With the use of SVN externals we can make SVN do most of the heavy lifting for us.
In the simplest case, we have two repositories we want linked. (I keep a 'research' repository that also contains backups of configuration files that don't belong in the group SVN or clocksyn SVN)
To do this, in the directory where you want to create a subfolder perform the following operation:
svn propset svn:externals 'FOLDERNAME REPO' .
Concrete example:
svn propset svn:externals 'clocksyn http://gforge.soe.ucsc.edu/svn/clocksyn' .
What if you have multiple directories you want to manage? We can do this with a file.
For example, create a file called "svn.externals" (add it to the main repository!) with contents like:
clocksyn http://gforge.soe.ucsc.edu/svn/clocksyn papers svn+ssh://mada0.cse.ucsc.edu/mada/users/vlsi/papers theses svn+ssh://mada0.cse.ucsc.edu/mada/users/vlsi/theses
Now set the property such that it reads this file:
svn propset svn:externals -F svn.externals .
Now the next time you do an update it will follow the symbolic links.
$ svn up Fetching external item into 'clocksyn' External at revision 1182. Fetching external item into 'papers' External at revision 4593. Fetching external item into 'theses' External at revision 4593. At revision 6.
status will also show results like:
$ svn st X clocksyn X papers X theses Performing status on external item at 'clocksyn' Performing status on external item at 'papers' Performing status on external item at 'theses'