如何使Subversion从其他存储库中签出项目?

时间:2020-03-05 18:56:37  来源:igfitidea点击:

我最近正在处理一个Subversion项目,该项目不仅从我正在使用的存储库中签出代码,而且还从另一台服务器上的单独存储库中签出代码。

我该如何配置我的存储库来做到这一点?

我在Linux上使用Subversion客户端版本1.3.2,并且在Windows中也可以访问TortoiseSVN版本1.4.8(基于svn版本1.4.6构建)。

解决方案

回答

参见svn:externals:

Sometimes it is useful to construct a working copy that is made out of a number of different checkouts. For example, you may want different subdirectories to come from different locations in a repository, or perhaps from different repositories altogether. You could certainly setup such a scenario by hand—using svn checkout to create the sort of nested working copy structure you are trying to achieve. But if this layout is important for everyone who uses your repository, every other user will need to perform the same checkout operations that you did.
  
  Fortunately, Subversion provides support for externals definitions. An externals definition is a mapping of a local directory to the URL—and possibly a particular revision—of a versioned resource. In Subversion, you declare externals definitions in groups using the svn:externals property. You can create or modify this property using svn propset or svn propedit (see the section called “Why Properties?”). It can be set on any versioned directory, and its value is a multi-line table of subdirectories (relative to the versioned directory on which the property is set) and fully qualified, absolute Subversion repository URLs...

回答

我认为我们应该看看svn:externals属性

回答

尝试svn:externals

http://svnbook.red-bean.com/en/1.0/ch07s03.html

回答

在文档中搜索svn:externals属性。