External definition of SVN: externals
From: http://blog.csdn.net/jaconey/archive/2008/05/15/2448986.aspx
Solve your external dependencies-SVN: externals
In daily project version management, we may need to put different repository in different directories, or put several repository together. most of the time, this is to solve the dependency in build, so this "personalized" structure should be shared and become a part of the version. otherwise, project members need to establish such structures with different styles and may also cause omissions.
The built-in property of subversion supports the following attributes: SVN: externals.
Let's look at an example: Suppose we have a calc project. It depends on some third-party sound files, placed in the red-bean.com. Let's take a look at the set properties:
$ SVN propget SVN: externals calc
Third-party/sounds http://sounds.red-bean.com/repos
In this way, when we need to checkout this calc project, this effect will appear:
$ SVN checkout http://svn.example.com/repos/calc
A calc
A calc/makefile
A calc/integer. c
A calc/button. c
Checked out revision 148.
Fetching external item into calc/third-party/sounds
A calc/third-party/sounds/ding.ogg
A calc/third-party/sounds/dong.ogg
A calc/third-party/sounds/clang.ogg
...
As you can see, third-party files are also checkout.
Because external files are uncontrollable, if you always use the latest external modifications, it may be different from our existing version, and the existing build may fail. therefore, subversion also provides the function of specifying a specific revision. suppose that the external project and our matching version are revision 21, we can do this, for example:
$ SVN propget SVN: externals calc
Third-party/sounds http://sounds.red-bean.com/repos
Third-party/skins/toolkit-R21 http://svn.red-bean.com/repos/skin-maker
In this way, the next time we checkout, we will only get the revision 21 version, which will not affect our existing build.
The above mentioned mainly involves obtaining SVN: externals. If you need to set this attribute, we mainly use SVN propset or SVN propedit.
Note the following two points,
Because SVN: externals most of the external items to be specified are multiline, we recommend that you use propedit for editing.
This property only works for directories and cannot be applied to stand-alone files. External definitions cannot point to relative paths such as http://www.cnblogs.com/skins/myskin ). The work copy created through external definition is not connected to the master work copy,
After modifying SVN: externals, each time you use update, the corresponding external files will be checked and updated (of course, this is also true for checkout ).
Attributes are also included in the version management of subversion, so you can upload the modifications to the directory to the server, share them with other project members, and baseline them.
This feature looks very beautiful, just like link, but it also has some inherent shortcomings, that is, this property is static! If the svn structure changes, the attributes will not be changed based on your changes. Here we reference an example in svn book.
In addition, when HTTPS is used as the commit, there may also be problems. Here we will leave a few tips to stop this article.ArticleIf you are interested, please read charter3 of svn book, which will certainly benefit you a lot.
Refer:
Http://zhongkun.72pines.com/2009/12/15/svnexternals-%E5%B1%9E%E6%80%A7%E4%B9%8B%E4%BD%BF%E7%94%A8/