You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by ch...@apache.org on 2015/04/10 15:46:11 UTC

svn commit: r1672665 - /jackrabbit/oak/branches/1.0/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/Commit.java

Author: chetanm
Date: Fri Apr 10 13:46:11 2015
New Revision: 1672665

URL: http://svn.apache.org/r1672665
Log:
OAK-2673 - Resolve add-add, delete-delete merge conflict for empty hidden docs

Applying updated patch by Vikas to fully disable the feature properly

Modified:
    jackrabbit/oak/branches/1.0/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/Commit.java

Modified: jackrabbit/oak/branches/1.0/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/Commit.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.0/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/Commit.java?rev=1672665&r1=1672664&r2=1672665&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.0/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/Commit.java (original)
+++ jackrabbit/oak/branches/1.0/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/Commit.java Fri Apr 10 13:46:11 2015
@@ -477,12 +477,16 @@ public class Commit {
             }
             String conflictMessage = null;
             if (newestRev == null) {
-                if ((op.isDelete() || !op.isNew()) && isConflicting(before, op)) {
+                if ((op.isDelete() || !op.isNew()) &&
+                        (!nodeStore.getEnableConcurrentAddRemove() || isConflicting(before, op))
+                        ) {
                     conflictMessage = "The node " +
                             op.getId() + " does not exist or is already deleted";
                 }
             } else {
-                if (op.isNew() && isConflicting(before, op)) {
+                if (op.isNew() &&
+                        (!nodeStore.getEnableConcurrentAddRemove() || isConflicting(before, op))
+                        ) {
                     conflictMessage = "The node " +
                             op.getId() + " was already added in revision\n" +
                             newestRev;