I am managing a set of software projects, namely, X, Y and Z. There is a set of dependencies among them, i.e. X --> Y --> Z. It means that project X depends on the interfaces of Project Y and Y is dependent to 开发者_开发问答Z interfaces.
Unfortunately, X, Y and Z are kept on separate svn repositories. Now the question is how can I take a snapshot (create a tag) of a stable version of my product, including specific versions of X, Y and Z? Any solutions would be helpful.
Look at the externals
feature in SVN. http://svnbook.red-bean.com/en/1.6/svn.advanced.externals.html
As it has already been suggested you can use svn:externals
to record the relationships among different variants of your projects. The idea is to define a root project so that by checking out either the trunk, a branch or a tag of this project you'll check out the correct variant of each of the other projects. So, assuming you have:
svn://repo1/X
svn://repo2/Y
svn://repo3/Z
You should create a root project like
svn://repo4/root
where
svn://repo4/root/trunk
will have externals defined as
X svn://repo1/X/trunk
Y svn://repo2/Y/trunk
Z svn://repo3/Z/trunk
and
svn://repo4/root/tags/TAG
will have externals defined as
X svn://repo1/X/tags/TAG
Y svn://repo2/Y/tags/TAG
Z svn://repo3/Z/tags/TAG
You can create the initial externals definition with the svn propset command; when you want to create a new tag you tag all your projects separately as usual, including root. Then you check out the new root tag with the --ignore-externals option and set your externals again with the corresponding tag URL's.
svn:externals does the job for you as already mentioned ... . Check this blog post for a step by step description. The first blog comment improves the workflow using a "release branch".
精彩评论