Subversive: svn: E195016: Cannot merge into a working copy with a switched subtree

Alessandro C picture Alessandro C · Dec 13, 2016 · Viewed 9.8k times · Source

I have an issue with Eclipse and Subversive.

I'm trying to reintegrate a branch of a project into the trunk.

These are the operations that I'm following:

  1. Switch to the trunk version of the project
  2. I have ensured that there were no any pending operations, doing a Revert and an Update, in order to start from a "clean" working copy, perfectly synchronized with the remote copy of the trunk
  3. I go to "Team -> Merge ..."
  4. I go to the "Reintegrate" tab, and I choose the branch that I want to merge within the trunk, pointing at "Head revision" of the branch.
  5. I press the OK button, but this is the error that I obtain:

 Merge operation failed.
Can't overwrite cause with org.tmatesoft.svn.core.SVNException: svn: E195016:
Cannot merge into a working copy with a switched subtree

I don't understand what's wrong.

I'm using this Eclipse and SVN configuration:

Eclipse Java EE IDE for Web Developers.
Version: Neon.1 Release (4.6.1)
Build id: 20160913-0900

Subversive SVN Team Provider    4.0.3.I20161129-1700    

SVNKit 1.8.14 Implementation (Optional) 6.0.3.I20161124-1700

SVN 1.9

Thanks in advance.

Answer

Alessandro C picture Alessandro C · Dec 14, 2016

I don't know exactly why there is this issue, but I noticed that it occurs if we perform some "switch" operations between branches before the Merge operation.

For some reasons, in this situation it's avoided to perform a merge operation.

The "workaround" that I have found is to perform the merge operation on a clean copy of the trunk, after the SVN checkout of the trunk, without make any switch operation.

In this way, the error doesn't occurs any more.

It's not a practical solution, but it works.