jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1556847 - in /jackrabbit/oak/trunk/oak-core/src/main: java/org/apache/jackrabbit/oak/plugins/commit/AnnotatingConflictHandler.java resources/org/apache/jackrabbit/oak/plugins/nodetype/write/builtin_nodetypes.cnd
Date Thu, 09 Jan 2014 15:47:26 GMT
Author: angela
Date: Thu Jan  9 15:47:26 2014
New Revision: 1556847

URL: http://svn.apache.org/r1556847
Log:
OAK-1316 : AnnotatingConflictHandler does not set primary type of rep:ours nodes

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/commit/AnnotatingConflictHandler.java
    jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/nodetype/write/builtin_nodetypes.cnd

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/commit/AnnotatingConflictHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/commit/AnnotatingConflictHandler.java?rev=1556847&r1=1556846&r2=1556847&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/commit/AnnotatingConflictHandler.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/commit/AnnotatingConflictHandler.java
Thu Jan  9 15:47:26 2014
@@ -16,17 +16,21 @@
  */
 package org.apache.jackrabbit.oak.plugins.commit;
 
+import java.util.List;
+
 import org.apache.jackrabbit.oak.api.PropertyState;
+import org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants;
 import org.apache.jackrabbit.oak.spi.commit.ConflictHandler;
 import org.apache.jackrabbit.oak.spi.state.ConflictType;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 
-import java.util.List;
-
 import static com.google.common.collect.Lists.newArrayList;
 import static org.apache.jackrabbit.JcrConstants.JCR_MIXINTYPES;
+import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE;
 import static org.apache.jackrabbit.oak.api.Type.NAMES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.MIX_REP_MERGE_CONFLICT;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_OURS;
 import static org.apache.jackrabbit.oak.spi.state.ConflictType.ADD_EXISTING_NODE;
 import static org.apache.jackrabbit.oak.spi.state.ConflictType.ADD_EXISTING_PROPERTY;
 import static org.apache.jackrabbit.oak.spi.state.ConflictType.CHANGE_CHANGED_PROPERTY;
@@ -36,8 +40,6 @@ import static org.apache.jackrabbit.oak.
 import static org.apache.jackrabbit.oak.spi.state.ConflictType.DELETE_CHANGED_PROPERTY;
 import static org.apache.jackrabbit.oak.spi.state.ConflictType.DELETE_DELETED_NODE;
 import static org.apache.jackrabbit.oak.spi.state.ConflictType.DELETE_DELETED_PROPERTY;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.MIX_REP_MERGE_CONFLICT;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_OURS;
 
 /**
  * This {@link ConflictHandler} implementation resolves conflicts to
@@ -48,7 +50,7 @@ import static org.apache.jackrabbit.oak.
  * [rep:MergeConflict]
  *   mixin
  *   primaryitem rep:ours
- *   + rep:ours (nt:unstructured) protected IGNORE
+ *   + rep:ours (rep:Unstructured) protected IGNORE
  * </pre>
  *
  * The {@code rep:ours} sub node contains our version of the node prior to
@@ -126,7 +128,9 @@ public class AnnotatingConflictHandler i
         if (mixins.add(MIX_REP_MERGE_CONFLICT)) {
             parent.setProperty(JCR_MIXINTYPES, mixins, NAMES);
         }
-        return parent.child(REP_OURS);
+        NodeBuilder repOurs = parent.child(REP_OURS);
+        repOurs.setProperty(JCR_PRIMARYTYPE, NodeTypeConstants.NT_REP_UNSTRUCTURED);
+        return repOurs;
     }
 
     private static NodeBuilder createChild(NodeBuilder parent, ConflictType ct) {

Modified: jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/nodetype/write/builtin_nodetypes.cnd
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/nodetype/write/builtin_nodetypes.cnd?rev=1556847&r1=1556846&r2=1556847&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/nodetype/write/builtin_nodetypes.cnd
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/nodetype/write/builtin_nodetypes.cnd
Thu Jan  9 15:47:26 2014
@@ -786,4 +786,4 @@
 [rep:MergeConflict]
   mixin
   primaryitem rep:ours
-  + rep:ours (nt:unstructured) protected IGNORE
+  + rep:ours (rep:Unstructured) protected IGNORE



Mime
View raw message