开发者

How to deal with relative links from a subversion repository when branching and tagging?

We have a project which contains many subprojects, which contain relative links to files outside their trunk, to a parallel project containing shared code, for example:

shared/trunk/functions.sh
subproject1/trunk/main.sh
subproject2/trunk/main.sh
..
subproject99/trunk/main.sh

Where subproject*/trunk/main.sh invariably contains code like this:

# subprojectXX/trunk/main.sh
#!/bin/sh
source ../../shared/trunk/functions.sh

During the life of this project, we have made release tags for each of the subprojects, for example:

subproject1/tags/1.0.0
subproject1/tags/2.0.0

Now, I need to make a branch based on the 1.0.0 tag, but if I do

svn cp subproject1/tags/1.0.0 subproject1/branches/1.0.1

Then the relative paths to the shared functions no longer work.

I am tempted to do:

svn cp subproject1/tags/1.0.0 subproject1/trunk

Then do my work in trunk, and then copy it to a new tag when I'm done, eg:

svn cp subproject1/trunk subproject1/tags/1.0.1

However I am worried that th开发者_JS百科is will cause all sorts of problems. Are my instincts correct?

Thanks for the suggestions about svn:externals, but I was looking for a solution that would be a little less intrusive to the (large) existing code base.

Thanks,

pix


You are looking for svn:externals.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜