问题
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:
- Restore the original folder hierarchy in the trunk
- Perform the merge from the branch into the trunk
- Merge from the original hierarchy in the trunk into the new hierarchy in the trunk
- 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