You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Tobias Bocanegra <to...@day.com> on 2008/07/30 15:01:09 UTC
Re: Can anyone explain me how to change version from 1.0 to 2.0
you restore to the root version and then the next checkin will create 2.0.
regards, toby
On 7/30/08, Saumil.Baxi@zycus.com <Sa...@zycus.com> wrote:
> Hi,
> Whenever I am adding the revision version of the file . The
> version changes from 1.0 to 1.1 . But in some situation I want the version
> to change from 1.0 to 2.0 . Can anyone explain me how to do it? Code
> snippet will help a lot.
>
> Thanks,
> Saumil
Re: Can anyone explain me how to change version from 1.0 to 2.0
Posted by Jukka Zitting <ju...@gmail.com>.
On Wed, Jul 30, 2008 at 3:01 PM, Tobias Bocanegra
<to...@day.com> wrote:
> you restore to the root version and then the next checkin will create 2.0.
Except you can't easily restore the root version. See [1] for example
code that creates a relatively complex version history that includes a
2.0 version.
[1] http://fisheye6.atlassian.com/browse/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/VersioningTest.java?r=669840
BR,
Jukka Zitting
Re: Can anyone explain me how to change version from 1.0 to 2.0
Posted by Sa...@zycus.com.
Thanks for the reply but i didn't got what you want to say..
Below is the code that I am using for updation of version.
Node resNode = fileNode.getNode(JcrConstants.JCR_CONTENT);
resNode.checkout();
resNode.setProperty(JcrConstants.JCR_MIMETYPE , mimeType);
resNode.setProperty(JcrConstants.JCR_ENCODING, "");
resNode.setProperty(JcrConstants.JCR_DATA, inputStream);
resNode.setProperty(JcrConstants.JCR_LASTMODIFIED,
Calendar.getInstance());
resNode.save();
resNode.checkin();
So where will i restore the root version and checkin again.
Please try to provide some example to make it more clear
Thanks,
Saumil
"Tobias Bocanegra" <to...@day.com>
Sent by: tripod@day.com
07/30/2008 06:31 PM
Please respond to
users@jackrabbit.apache.org
To
users@jackrabbit.apache.org
cc
Subject
Re: Can anyone explain me how to change version from 1.0 to 2.0
you restore to the root version and then the next checkin will create 2.0.
regards, toby
On 7/30/08, Saumil.Baxi@zycus.com <Sa...@zycus.com> wrote:
> Hi,
> Whenever I am adding the revision version of the file . The
> version changes from 1.0 to 1.1 . But in some situation I want the
version
> to change from 1.0 to 2.0 . Can anyone explain me how to do it? Code
> snippet will help a lot.
>
> Thanks,
> Saumil