SVN Externals

The offi­cial SVN online man­ual has an arti­cle on this, please read it. I won’t let myself off the hook that easy and will give you a brief exam­ple on how to use them. Let’s say you have your own MVC project based on Zend Frame­work. You should off course store your app in SVN, but using the fol­low­ing com­mand you can dynam­i­cally link the frame­work to you library folder. Please con­sider the fol­low­ing com­mand know­ing that our present work­ing direc­tory is ‘library’:

svn propset 'svn:externals' 'Zend http://framework.zend.com/svn/framework/standard/tags/release-1.7.6/library/Zend' .

This com­mand wil link the Zend library and after per­form­ing an svn up your work­ing copy will also include ver­sion 1.7.6 of Zend Frame­work. Please also con­sider com­mit­ing, because other check­outs need to sync the frame­work too. Maybe I should explain the dif­fer­ent frag­ments of the com­mand too:

  • svn propset: this part will set a property
  • svn:externals: the prop­erty we’re gonna set is called ’svn:externals’
  • Zend: we will cre­ate a folder called ‘Zend’ which is a check­out of a spe­cific version
  • The URL. Quite self-explanatory
  • The dot (.): the dot spec­i­fies that the check­out will hap­pen in the cur­rent folder. You can also put a direc­tory name in there

Happy ver­sion­ing!

Tags:

3 Responses to "SVN Externals"

Leave a Comment

*

Get Adobe Flash playerPlugin by wpburn.com wordpress themes