开发者

How to resolve the SVN:externals problem

开发者 https://www.devze.com 2023-04-05 07:14 出处:网络
I am using SVN for my project. I have two repositories called repo1 and repo2. In each repository, I have created a branch called branch1 in both repositories. For one of the modules in branch1 of rep

I am using SVN for my project. I have two repositories called repo1 and repo2. In each repository, I have created a branch called branch1 in both repositories. For one of the modules in branch1 of repo2 called module1, an svn:external has been defined and is set to module1 of branch1 in Repo1.

But Now I created another branch called branch2 in repo1 and repo2 that is a copy of branch1 of both repos. Now my module1 in branch2 of repo2 still points to module1 开发者_开发技巧of branch1 in repo1. But it should refer to module1 of branch2 in repo1.

Is there any way were we can change svn:externals automatically when we do a SVN copy or svn branch?


I don't think this is possible. I don't think there is a way for svn to know if you want the svn externals to refer to branch2 or branch1.

Update: This discussion looks useful.


No, what you need is not possible to be done by svn automatically. Creating a branch copies the entire folder in svn as well as all of its external references.

But you may write your own scripts to create the branch and update the externals.


The definitive resource on svn:externals shows some possibilities for "relative" links. But none of them can cross repository borders the way you want.

This leaves the following options:

  • Put the related projects into the same repository and into the same branch directory and use relative svn:external links, or
  • Use and/or hack a tool like svncopy which purpose is to deal with svn:externals. This tool is in the subversion source tree in contrib/client-side/svncopy.
  • Or you can put branching/tagging into your build system.

None of these options is a nobrainer.

0

精彩评论

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

关注公众号