SVN tree conflict when merging a renamed folder

I use TortoiseSVN to merge the latest changes from trunk , including renaming the folder, to branch-B .

Before that, I reintegrated branch-A into the trunk . In this branch, the folder has been renamed, and changes have been made to it. Branch-B contains different revisions of these files, but the folder still has the original name.

When merging the trunk with branch B, SVN simply adds the renamed folder as new and reports a tree conflict in the originally named folder. File revisions themselves are never merged, and I stay with both folders. I tried several options to get the purest merge, preserving all the relevant svn: mergeinfo, but nothing seems to work.

Does anyone know how to properly complete this merge?

TortoiseSVN 1.8.10, Subversion 1.8.11

Here is the visual:

/trunk (before reintegrating branch-A) /Folder1 file1 file2 file3 /trunk (after reintegrating branch-A) /Folder1-Renamed file1-change1 file2-change1 file3 /branch-B /Folder1 file1-change2 file2-change2 file3 

TL; DR: How to merge file revisions between two branches correctly when the containing folder was renamed to one of them?

+9
merge svn tortoisesvn tree-conflict
source share
1 answer

Subversion has no really clean way to resolve structural tree conflicts. Basically, you need to do the following:

  • merge trunk in branch-B working copy
  • manually create the difference between the file1 and file2 changes in branch-B and apply them to the corresponding files in the newly merged Folder1-Renamed
  • delete obsolete directory Folder1
  • make sure it still works
  • accept the current state as correct (see also http://svnbook.red-bean.com/nightly/en/svn.tour.treeconflicts.html )
  • commit

Sorry, this doesn't get any easier than with svn. I'm a big fan of using Subversion for certain types of commands, but the nightmare of tree conflicts (and their secret mechanisms with errors and errors) regularly makes us cry (and switch to git forever).

+8
source share

All Articles