views:

131

answers:

2

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

A: 

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
Chris Gummer
A: 

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
Josef