Hi Toby, I am trying to implement the merging thing and since you have mentioned that if a V1.3 and V1.2.1 are merged it would result in V1.4, is it right to assume here that the node.merge() is called on V1.3 and not on 1.2.1. Also am i right in saying that if i try to call a merge() on V1.3 i would be getting a conflict?
I tried the same thing at my end. When i try to merge V1.3 and V1.2.1 (using the names as per your example) i get a conflicting result. The Node Iterator returned by merge() function contains the Node of V1.3 and has the jcr:mergeFailed property set to V1.2.1's UUID. I call node.doneMerge(V1.2.1) after that to mark the two versions as merged. At this point if i check the jcr:mergeFailed property, i get a "Path does not exist" Exception (due to which i assume that the property has been cleared and the Nodes have been marked as merged) but when i call the merge() on V1.3' Node i again get a Conflicting result. Am i missing something?? If you could provide any input it would be great On Thu, Dec 3, 2009 at 3:54 AM, Tobias Bocanegra <[email protected]> wrote: > Hi, > a branch is created when you perform a checkin on a node that has a > base version which has successors. > for example, if you have: > > v1.0 -> v1.1 -> v1.2 -> v1.3 > > and you restore the node to v1.2 (i.e. set it's base version to 1.2), > and then checkout, checkin, a new version v1.2.1 is created, which has > v1.2 as predecessor and v1.2 has v1.3 and v1.2.1 as successor. > > although you can create branches without having a 2nd workspace, for > merging you need one. > so you need to have a corresponding versionable node in the 2nd > workspace where you can merge against. > but there is no application logic behind the merging, e.g. like in svn > where the text files are "merged". so no content is actually merged, > but only the 2 version branches are brought together again. > > in the above example, if node in ws1 has base version v1.3 and its > corresponding node in ws2 has base version v.1.2.1 and you merge them, > you'll get v1.4 that hase v1.3 and v1.2.1 as predecessors. > > hope this helps. > regards, toby > > > On Wed, Dec 2, 2009 at 5:48 PM, Luiz Fernando Teston > <[email protected]> wrote: > > I saw that node.checkin() just can be called once to create a new > version. > > Is it possible to create new parallel versions based on the same node? > And > > after doing some work on this different versions, is it possible to merge > > two or more different versions to create a new merged version? > > > > The spec and other Jcr and Jackrabbit documentation doesn't show a > merging > > scenario, but it have some methods on javadoc which talks about merging. > But > > on the other side, the way I found to create new versions (checkin and > > checkout on node) only permit to create version nodes on a linear way. > > > > Regards, > > > > > > Fernando Teston > > > > On Tue, Dec 1, 2009 at 3:07 PM, Luiz Fernando Teston < > > [email protected]> wrote: > > > >> Fellows, > >> > >> Is there any documentation, website or test showing few examples about > >> versioning? I'm already using versioning on some parts of the software > I'm > >> working on, but now I need to do some branching behavior, and I didn't > find > >> any good material showing this. > >> > >> Best regards, > >> > >> > >> Fernando Teston > >> > > > -- Regards Robin Batra
