Hi, posting the code would not be possible but i can explain it through the psuedo code.
What i did was create a new node in W1 (workspace 1). create a node P1 create a node N under P1 made some changed in it and committed it back N.checkout(); N.checkin(); N-> V1.1 N.checkout(); N.checkin(); N-> V1.2 N.checkout(); N.checkin(); N-> V1.3 now i clone P1 to W2 (workspace 2) N' (node under cloned P1' ) N'.checkout() N'.checkin() it still gave me 1.4 and not 1.3.1 On Sat, Oct 24, 2009 at 1:36 AM, Tobias Bocanegra <[email protected]> wrote: > hi, > the history stays linear until you commit a node which baseversion has > a successor. > so after the 2nd checkin in my example, N' has still base version > V1.0. and V1.0 has a successor V1.1. > so the next checkin of N' should produce a V1.0.1. > > can you post sample code that reproduces you problem? > > regards, toby > > On Fri, Oct 23, 2009 at 11:49 AM, Robin Batra <[email protected]> > wrote: > > Hi Toby, > > > > Thanks a lot for your reply. I tired what you suggested but when i > checked > > in the cloned node it still was committed to the same version history. > > > > I cloned a node into a separate workspace and then made changes into the > > cloned node and committed it back again. initially its version was 1.3 > and > > when i committed changes to it the version was changed to 1.4 > > > > I am using jcr 1.0 and jackrabbit 1.5. Is it due to the jackrabbit or jcr > > version. > > > > Thanks a lot once again for replying... > > > > On Fri, Oct 23, 2009 at 1:36 AM, Tobias Bocanegra <[email protected]> > wrote: > > > >> hi, > >> what exactly do you need to know ? > >> > >> the repository supports non-linear version histories. to create a > >> branch you do the following: > >> > >> Assume you have a full versionable node N in workspace W and it's > >> versions Vn. And a 2nd workspace W' with the corresponding node N' > >> > >> N.checkin() -> V1.0 > >> W'.clone(W, N) -> N' (with V1.0) > >> > >> N.checkout() > >> N.checkin() -> V1.1 > >> > >> N'.checkout() > >> N'.checkin() -> V1.0.1 (now you created a branch) > >> N'.checkout() > >> N'.checkin() -> V1.0.2 > >> > >> N.merge(W') -> V1.2 (now you merged the branches again) > >> > >> i hope this helps. > >> regards, toby > >> > >> > >> On Tue, Oct 20, 2009 at 1:45 PM, Robin Batra <[email protected]> > >> wrote: > >> > Has anybody implemented Branching and Merging using Jackrabbit? > >> > > >> > any help will be appreciated, thanks in advance. > >> > > >> > -- > >> > Regards > >> > > >> > Robin Batra > >> > > >> > > > > > > > > -- > > Regards > > > > Robin Batra > > > -- Regards Robin Batra
