开发者

Restructuring SVN when you already have branches/tags

开发者 https://www.devze.com 2022-12-21 07:29 出处:网络
I have a project with a structure like this: project code art config Art is over 1Gb and likely to cause pains when switching branches, plus developers don\'t need it anyway. So I want to move it o

I have a project with a structure like this:

project
  code
  art
  config

Art is over 1Gb and likely to cause pains when switching branches, plus developers don't need it anyway. So I want to move it out into a separate top-level project, project-art. That's fine in trunk, but I already have some branches being actively worked on... so the actual current setup is more like:

project
  trunk
    code
    art
    config
  branches
    branch123
      code
      art
      config

How can I move art 开发者_C百科out of the conceptual structure without it screwing up when branches get merged back?

I can see one option is to move it from project/trunk ---> project-art/trunk and then simply delete art from each branch, but that seems hacky. Or, when I move it from trunk will it automatically be removed from branches too since they are lazy copies?


For feature branches that will eventually be merged back into trunk, you will normally merge all of the latest trunk changes into the branch before reintegrating the branch back to the trunk. Therefore, if you move art out of trunk now and leave the branches alone, then art should get deleted from the branches the next time they sync up with trunk.


I'd leave the branches alone, move project-art in the trunk and just merge art separately. Subversion sucks at tracking renames (it's just a delete and remove), and doesn't merge them.

  1. Merge svn://repo/project/branches/branch123/art with svn://repo/project-art

Then do the rest

  1. Merge svn://repo/project/branches/branch123/code with svn://repo/project/code
  2. Merge svn://repo/project/branches/branch123/code with svn://repo/project/config

I can see one option is to move it from project/trunk ---> project-art/trunk and then simply delete art from each branch, but that seems hacky.

I suppose if you have everything from art merged back to trunk then it is ok to delete them. Since like you said the programmers don't use them anyways.

Or, when I move it from trunk will it automatically be removed from branches too since they are lazy copies?

It won't automatically be removed from the branches. You'd have to merge trunk to the branch for that to happen.


If the 'art' subdirectory won't be modified in any of the branches, then you won't have to worry about the merges. Just go ahead and move 'art' into its new location. The branches will merge back into the trunk without conflicts since they have no changes to 'art'.

0

精彩评论

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

关注公众号