Search code examples
svnmergetortoisesvnankhsvn

Subversion: Merging branch back into trunk results in crash/conflicted state


Environment: TortoiseSVN 1.11.1 (x64), AnkhSVN 2.6.12735.14, Visual Studio Enterprise 2015 v 14.0.25431.01 Update 3, Windows 10 Pro x64 x1809, Subversion server on LAN running SVN 1.9.6.

I created a branch to add a new feature to my project; now merging the branch back into the trunk results in an unusable state, or SVN (TortoiseSVN in this case) crashes. (I am not a command-line user - the GUIs have been too nice to me. :)

In the case of attempting to use TortoiseSVN, my working copy is the trunk (at rev 867) and the branch I am integrating is at rev 884. When I do the merge, I select "all revisions" (there happen to be 4 in the branch, including the initial branch creation). Merge options: Depth: Working copy, Compare whitespaces, no other options checked. A Test Merge results in 12 conflicted, 1 deleted, 1 replaced, and 13 updated. This seems strange - I believe there should be 0 conflicts, as there haven't been any changes to the trunk since my branch.

When I do the actual merge, I go through the alleged conflicts, and essentially select all incoming files. After I complete reconciling all the conflicts, TortoiseSVN crashes (there are no crash logs in the Event Viewer). If I open the solution at this point in VS, I have 3 Tree Conflicts, and the files are not in a coherent state (projects don't compile), where I would expect them to be.

If I do this process via AnkhSVN within Visual Studio, I end up in the same state as with using TortoiseSVN, although there is no (visible) crash of any application.

One thing I wonder if I did "wrong" - when I created the branch, the branch was created with modifications, as opposed to first creating the branch with no files having been changed, then beginning modifications from there. Thanks for any pointers.


Solution

  • I ended up "manually" resolving each of the Tree Conflict files:

    • Note the file
    • Resolve the TC by using the working copy
    • Re-merge the single file from the feature branch back into trunk

    That seems to have worked. If there is a more "automated" way to do this, I would still be interested in hearing.