how do I integrate a branch into a trunk if the folder structure has changed?

大城市里の小女人 提交于 2019-12-08 03:22:34

问题


I need to intergrate a branch into the trunk but the folder hierarchy of my trunk changed in the meantime. I should still be able to merge sub-folders which preserve the original structure, but when I try I get an error.

Example:

  • Original structure when branch was created:
    • svn/trunk/dir1/dir2 --> svn/branches/b1/dir1/dir2
  • renamed:
    • svn/trunk/dir1 --> svn/trunk/dir3
  • made changes to files in svn/branches/b1/dir1/dir2

Now I want to reintegrate svn/branches/b1/dir1/dir2 --> svn/trunk/dir3/dir2


回答1:


One method:

  1. Restore the original folder hierarchy in the trunk
  2. Perform the merge from the branch into the trunk
  3. Merge from the original hierarchy in the trunk into the new hierarchy in the trunk
  4. Delete the old hierarchy in the trunk



回答2:


Subversion's merge should work in any directory so just do

svn merge svn/branches/b1/dir1/dir2 svn/trunk/dir3/dir2 svn/trunk/dir3/dir2


来源:https://stackoverflow.com/questions/949332/how-do-i-integrate-a-branch-into-a-trunk-if-the-folder-structure-has-changed

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!