R – how to integrate a branch into a trunk if the folder structure has changed

svntortoisesvn

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

Best Answer

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