You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2007/03/03 15:14:51 UTC
[jira] Updated: (JCR-772) Merging between workspaces fails
[ https://issues.apache.org/jira/browse/JCR-772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting updated JCR-772:
------------------------------
Fix Version/s: (was: 1.3)
1.2.3
Tagging this still for 1.2.3.
> Merging between workspaces fails
> --------------------------------
>
> Key: JCR-772
> URL: https://issues.apache.org/jira/browse/JCR-772
> Project: Jackrabbit
> Issue Type: Bug
> Components: versioning
> Affects Versions: 0.9, 1.0, 1.0.1, 1.1, 1.1.1, 1.2.1, 1.2.2
> Reporter: Tobias Bocanegra
> Assigned To: Tobias Bocanegra
> Fix For: 1.2.3
>
>
> I have setup 2 workspaces in Jackrabbit. I have a preview and a production
> workspace. These workspaces keep a tree of menu nodes that can have content
> associated to those menus. Each node is of type nt:unstructured and has
> mixin types of versionable, lockable, and referenceable.
> In our system you are only allowed to edit nodes in the preview workspace.
> So what I do is when you go to edit a node we check it out, allow for edits,
> then check it in. This creates a new version on the node. Then we merge
> the node up to the production workspace. All nodes in the production
> workspace are always checked in and not locked.
> When I go to do a merge I run into problems when I try to merge a node that
> has children. Lets say I have node A with children B and C. These all have
> the same node types as stated above. I make a change to a property in Node
> A in the preview workspace and now want to merge it into the production
> workspace (where it exists already). Here is the code that is run:
> Node destNode = destSession.getNodeByUUID(getUUID());
> NodeIterator ni = destNode.merge("preview", true);
> Now this fails in the ItemImpl.internalRemove() method with a
> VersionException of cannot remove a child of a checked-in node. Here is the
> trace for the error:
> at org.apache.jackrabbit.core.ItemImpl.internalRemove(ItemImpl.java:848)
> at org.apache.jackrabbit.core.NodeImpl.internalMerge(NodeImpl.java:3693)
> at org.apache.jackrabbit.core.NodeImpl.internalMerge(NodeImpl.java:3587)
> at org.apache.jackrabbit.core.NodeImpl.merge(NodeImpl.java:3003)
> Now if I understand correctly when doing a merge the node that you are
> trying to merge to needs to be older then the source node and the
> destination node cannot be checked out (NodeImpl.doMergeTest() is where I
> figured that out). But then when I step through further in the merge in
> NodeImpl it gets all the nodes of the src node and retrieves the same
> children in the destination workspace and then tries to remove those
> destination children but it can't remove those children b/c the parent node
> (which is node A in the production workspace) is not checked out, but
> according to the mergeTest it can't be checked out or the merge won't even
> begin.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.