jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Speck <marcsp...@gmail.com>
Subject Re: Restore version node without loosing versions
Date Thu, 16 Jul 2009 12:37:38 GMT
On Thu, Jul 16, 2009 at 12:34 PM, Tobias Bocanegra <tripod@day.com> wrote:

> hi,
>
> > I have a node with version 1.1 and 1.2 and I want to restore 1.1. After
> > calling node.restore(1.1), there is only 1.1 left and 1.2 is removed,
> e.g.
> >
> > Version restoreMe = node.getVersionHistory().getVersion("1.1");
> > node.restore(restoreMe, false);
> this is not true (or should not be the case). but the base version
> will point to 1.1. the next checkin will create a branch, with the
> version 1.1.1.


You're right. I only walked down from node.getBaseVersion() with
version.getPredecessors() and missed the successor of 1.1
To find out the number of versions, I have too loop over
node.getVersionHistory().getAllVersions(), right?



>
> > Is it possible to restore 1.1 without losing 1.2, such that the history
> > looks like 1.1, 1.2, 1.3. In this example 1.3 is identical to 1.1.
>
> let me rephrase it: is it possible to restore 1.1 so that the next
> checkin will create version 1.3 ?
>
> this is currently not possible. JSR283 specifies "simple versioning"
> which does not allow branches and where a restore will automatically
> create a new version (e.g. 1.3 in this case).


Yes, that's what I need but stable JCR 2.0 seems many months away :(   But
hey, keep up the great work :)



> there might be a solution with a 2nd workspace:
> - restore 1.1 in the 2nd workspace
> - merge 1.2 and 1.1 in 'this' workspace
> but i'm not sure if this works :-)


I thought about that too. Though it seems quite "experimental". Has anybody
ever done that?

Another way is manually copying all property values from version 1.1 to 1.3.
It might be better because I only need it for a particular node type.

Thanks for the help,
Marc

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message