You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Michael Neale <mi...@gmail.com> on 2007/01/24 23:26:22 UTC

Restoring a version - lose intermediate versions?

If I have a graph of versions:

v1, v2, v3, v4, v5 (v5 is latest)

And I open the Version for v2, and restore (Node.restore(v2)), the graph
then appears to look like:

v1, v2 -    v3 and up are gone?
I assume this is "correct" behviour, as I am not doing anything fancy, just
surprised me.

My empirical understanding is that when I restore v2, I am not just wacking
on a new version with the old content, I am actually "rolling back" the
whole version graph to the state it was - at that point in time?

I am right? So if I want to work the "subversion" style of restoring - I
can, but I can't use JCR restore (I have to basically grab the old content,
and check it in as a new version, which works fine for me, I just want to
make sure I understand it).

Thanks,

Michael.

Re: Restoring a version - lose intermediate versions?

Posted by Michael Neale <mi...@gmail.com>.
to clarify, I am using the "jcr:predecessors" to get to the predecessors.

Should I be using VersionHistory instead? and the iterator?

On 1/29/07, Michael Neale <mi...@gmail.com> wrote:
>
> Hi Toby. Yes, just walking back through pre-decessors - whats the
> alternative?
>
> On 1/25/07, Tobias Bocanegra < tobias.bocanegra@day.com> wrote:
> >
> > hi,
> > how do you display the version graph? by walking the version history?
> > regards, toby
> >
> > On 1/24/07, Michael Neale <mi...@gmail.com> wrote:
> > > If I have a graph of versions:
> > >
> > > v1, v2, v3, v4, v5 (v5 is latest)
> > >
> > > And I open the Version for v2, and restore (Node.restore(v2)), the
> > graph
> > > then appears to look like:
> > >
> > > v1, v2 -    v3 and up are gone?
> > > I assume this is "correct" behviour, as I am not doing anything fancy,
> > just
> > > surprised me.
> > >
> > > My empirical understanding is that when I restore v2, I am not just
> > wacking
> > > on a new version with the old content, I am actually "rolling back"
> > the
> > > whole version graph to the state it was - at that point in time?
> > >
> > > I am right? So if I want to work the "subversion" style of restoring -
> > I
> > > can, but I can't use JCR restore (I have to basically grab the old
> > content,
> > > and check it in as a new version, which works fine for me, I just want
> > to
> > > make sure I understand it).
> > >
> > > Thanks,
> > >
> > > Michael.
> > >
> > >
> >
> >
> > --
> > -----------------------------------------< tobias.bocanegra@day.com >---
> > Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
> > T +41 61 226 98 98, F +41 61 226 98 97
> > -----------------------------------------------< http://www.day.com >---
> >
>
>

Re: Restoring a version - lose intermediate versions?

Posted by Michael Neale <mi...@gmail.com>.
Hi Toby. Yes, just walking back through pre-decessors - whats the
alternative?

On 1/25/07, Tobias Bocanegra <to...@day.com> wrote:
>
> hi,
> how do you display the version graph? by walking the version history?
> regards, toby
>
> On 1/24/07, Michael Neale <mi...@gmail.com> wrote:
> > If I have a graph of versions:
> >
> > v1, v2, v3, v4, v5 (v5 is latest)
> >
> > And I open the Version for v2, and restore (Node.restore(v2)), the graph
> > then appears to look like:
> >
> > v1, v2 -    v3 and up are gone?
> > I assume this is "correct" behviour, as I am not doing anything fancy,
> just
> > surprised me.
> >
> > My empirical understanding is that when I restore v2, I am not just
> wacking
> > on a new version with the old content, I am actually "rolling back" the
> > whole version graph to the state it was - at that point in time?
> >
> > I am right? So if I want to work the "subversion" style of restoring - I
> > can, but I can't use JCR restore (I have to basically grab the old
> content,
> > and check it in as a new version, which works fine for me, I just want
> to
> > make sure I understand it).
> >
> > Thanks,
> >
> > Michael.
> >
> >
>
>
> --
> -----------------------------------------< tobias.bocanegra@day.com >---
> Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
> T +41 61 226 98 98, F +41 61 226 98 97
> -----------------------------------------------< http://www.day.com >---
>

Re: Restoring a version - lose intermediate versions?

Posted by Tobias Bocanegra <to...@day.com>.
hi,
how do you display the version graph? by walking the version history?
regards, toby

On 1/24/07, Michael Neale <mi...@gmail.com> wrote:
> If I have a graph of versions:
>
> v1, v2, v3, v4, v5 (v5 is latest)
>
> And I open the Version for v2, and restore (Node.restore(v2)), the graph
> then appears to look like:
>
> v1, v2 -    v3 and up are gone?
> I assume this is "correct" behviour, as I am not doing anything fancy, just
> surprised me.
>
> My empirical understanding is that when I restore v2, I am not just wacking
> on a new version with the old content, I am actually "rolling back" the
> whole version graph to the state it was - at that point in time?
>
> I am right? So if I want to work the "subversion" style of restoring - I
> can, but I can't use JCR restore (I have to basically grab the old content,
> and check it in as a new version, which works fine for me, I just want to
> make sure I understand it).
>
> Thanks,
>
> Michael.
>
>


-- 
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---