开发者

Can I create a subversion branch that tracks trunk?

I would like to create a branch of one of the modules in my SVN repository. This module contains several sub-modules. I would like some of these sub-modules to be divergent in the branch, but other sub-modules should maintain consistency with trunk.

So, for example,开发者_StackOverflow社区 sub-module A should be divergent between BRANCH and TRUNK, but sub-module B should not. A change committed to A in BRANCH will not appear in TRUNK, but a change committed to B in BRANCH will automatically be reflected in TRUNK. I'd like this to happen automatically, without me having to force relevant changes from BRANCH into TRUNK.

Is this something that is possible to do using subversion?


even though this might be technically possible (perhaps by using externals as mentioned by JB in comments or maybe some obscure svn feature), I don't think there's really any viable solution for what you're looking for.

What about separating the modules into different svn paths like so?

MainApp
  /trunk - would depend on ModuleB/branches/branch1
  /branches
    /branchA - would depend on ModuleA/branches/branch1
  /tags
ModuleA
  /trunk
  /branches
    /branch1
  /tags
ModuleB
  /trunk
  /branches
    /branch1
  /tags

That way, changes to Module B would affect MainApp/trunk. Changes to Module A would affect MainApp/branches/branchA.

This structure also usually works well with build tools.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜