4
votes

Merging branch A into branch B(local working copy) where branch A added a couple of new folders with new files. The new folders all got flagged as "Tree conflict" with error message: "The last merge operation tried to modify the directory '[folder name]', but the directory is missing locally."

Ya no kidding it's missing locally, it was created in the other branch and should be copied into the local working branch along with all files/folders inside it!

I have a reasonable understanding of what Tree Conflicts are and I do not believe this should be one. The new folder in A never existed in B!

What can I do? Doing a diff between the two branches with WinMerge and only selecting "show left unique items" is error prone because of files that were deleted in B that were not deleted in A.

2
It did add new files when they were in existing folders. It chokes on new folders. - Skychan
Only solution I can think of is, once I'm done resolving all conflicts and commit, then I can manually create the missing folders and re-perform the merge. - Skychan
I still don't have a solution. Re-performing the merge doesn't appear to be considering the new folders and files as needing to be copied over to the other branch. I don't understand. Two branches branched away from trunk and one branch adds new folders/files, then doing a merge should bring those over to the other branch. - Skychan

2 Answers

1
votes

I was able to get the files copied over with their history by simple TortoiseSvn -> Paste command:

http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-copy.html

1
votes

This happened to me when I manually selected a couple revisions to merge to a different branch, but missed the one that actually created the folders (sloppy, I know).

Including the revision that created the folders solved the problem.