jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dieter Wachters <dieter.wacht...@lettergen.com>
Subject RE: Cancel checkout
Date Wed, 09 Jun 2010 12:10:12 GMT
No that creates a new version, which I don't want.


Dieter Wachters
Architect
direct:
dieter.wachters@lettergen.com

LetterGen
Groene Hofstraat 31
2850 Boom
Belgium
www.lettergen.com
tel: +32 3 450 89 80
fax: +32 3 450 89 89

- DISCLAIMER -
This message contains confidential information and is intended only for users@jackrabbit.apache.org.
If you are not users@jackrabbit.apache.org, you should not disseminate, distribute or copy
this e-mail. Please notify dieter.wachters@lettergen.com immediately by e-mail if you have
received this e-mail by mistake and delete this e-mail from your system. E-mail transmission
cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or contain viruses. Dieter Wachters therefore
does not accept liability for any errors or omissions in the contents of this message, which
arise as a result of e-mail transmission. If verification is required please request a hard-copy
version.
--------------------------------------------------------------------------

-----Original Message-----

From: Paco Avila [mailto:monkiki@gmail.com]
Sent: woensdag 9 juni 2010 12:47
To: users@jackrabbit.apache.org
Subject: Re: Cancel checkout

I think is as simple as:

node.restore(node.getBaseVersion(), true);

On Wed, Jun 9, 2010 at 11:56 AM, Dieter Wachters
<dieter.wachters@lettergen.com> wrote:
> Hi,
>
> I might have found a solution that seems to work at first sight, but would like to hear
if this isn't breaking something.
> I use the restore method and then remove the latest version again. So I get something
like:
>        final VersionManager vm = session.getWorkspace().getVersionManager();
>        vm.restore(session.getWorkspace().getVersionManager().getBaseVersion(path), true);
>        final Node baseVersion = vm.getBaseVersion(path);
>        final VersionHistory vh = vm.getVersionHistory(path);
>        vh.removeVersion(baseVersion.getName());
>

--
OpenKM
http://www.openkm.com
http://www.guia-ubuntu.org


Mime
View raw message