解决方案:
TortoiseSVN操作方法:右键->TortoiseSvn Properties->如下图编辑
Subversion provides a natural way to pull together resources from different parts of one or more subversion repository locations into a single working folder. Once setup the commits are pushed into correct parent locations and updates are pulled from the initially configured urls. This mechanism works equivalent to the symbolic links. Here is an example.
Step 1:
Create a folder ./externals
Step 2:
Add the new folder into repository using command,
svn add ./externals
Step 3:
Create a file “externals.txt” with these two lines
tomcat/bin http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/bin
apacheds/resources http://svn.apache.org/repos/asf/directory/apacheds/tags/1.5.7/resources
Step 4:
From command line run the following command.
svn propset svn:externals ./externals -F externals.txt
You are all set. Any updates on externals folder (after committing the newly created folder) will fetch you the latest from tomcat/trunk and apacheds/tags/1.5.7/resources. What the command has done is to set a property names ‘svn:externals’ into the folder metadata of folder ‘externals’ that tells svn client that some of its child folders are to be fetched/updated/committed through a different repository location.
If you change any parts of the “externals” code, you will be able to check it in right into the correct code-base. This solution avoids potential mess ups involving code base mash-ups.
One flipside of this solution is that while branching or tagging you will need to be extra careful in case your symbolic links also needs to shift. To this effect it is worth noting that there are other useful commands for managing svn folder properties. Check out the documentation here.举例:
1:如果需要在 test 目录下,增加 comlibs 目录的链接文件,链接到 http://192.168.1.35/svn/media/software/comlibs/ 路径
则 externals.txt 文件内容如下所示:
comlibs http://192.168.1.35/svn/media/software/comlibs/
2:再把 externals.txt 文件放到 test 目录的平级位置,如
│ ├── 1
│ │ ├── test
│ │ │ ├── buffer.c
│ │ │ ├── buffer.h
│ │ │ └── Makefile
│ │ ├── externals.txt
3:在 目录 1 下执行如下命令
svn propset svn:externals dvs -F externals.txt
4:提交修改属性
svn ci -m "modify"
5:更新,下载 comlibs 目录
svn update
6:最后目录如下所示
│ ├── 1
│ │ ├── test
│ │ │ ├── buffer.c
│ │ │ ├── buffer.h
│ │ │ └── Makefile
│ │ │ └── comlibs
│ │ ├── externals.txt