Merge Conflict with identical new created directories in intellij IDEA with SVN

240 Views Asked by At

Background:

We are using last IntelliJ IDEA 2019.3.3 (Ultimate Edition) and SVN as repository.

Problem:

If two people are creating a new identical directory with own content in their local checkout and want to commit those files, the second committer gets a conflict. This is good so far. Which results into the following: Intellij only provides options for "Accept Yours" or "Accept Theirs" but not a merging option.

Example For "Accept Yours" and "Accept Theirs"

Why?

If we accept "their"-version we will "replace" (as it is announced later in the "affected files overview") our whole directory with their version and delete automatically our content and if we use "yours"-version we will completely accept our version but delete all content-files of "their" commit. What we need in this case is the option to merge to one directory and accept both contents.

Is there an alternative way to solve this and accept both directory contents?

For example:

User 1 commits new directory with content:

sameDirectory
|- UserOneFileOne.java

User 2 commits new directory with same name but with own content with conflicts:

sameDirectory
|- UserTwoFileOne.java

result with accepting "Theirs" Version:

sameDirectory
|- UserOneFileOne.java

result with accepting "Yours" Version:

sameDirectory
|- UserTwoFileOne.java

desired result:

sameDirectory
|- UserOneFileOne.java
|- UserTwoFileOne.java
1

There are 1 best solutions below

0
On BEST ANSWER

IntelliJ relies on the command-line svn client, and svn does not support such merges. It is a tree conflict, and to solve it one has to accept one tree branch or another

If you agree with the move, your bar.c is superfluous. You'll want to delete it and mark the tree conflict as resolved. But wait: you made changes to that file! Before deleting bar.c, you need to decide if the changes you made to it need to be applied elsewhere, for example to the new baz.c file where all of bar.c's code now lives. Let's assume that your changes do need to “follow the move”. Subversion isn't smart enough to do this work for you[10], so you need to migrate your changes manually.

http://svnbook.red-bean.com/en/1.8/svn.tour.treeconflicts.html