jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Bocanegra <tobias.bocane...@day.com>
Subject Re: Cancel checkout
Date Wed, 09 Jun 2010 22:09:03 GMT
hi,
restoring the base version is the proper way to "cancel" a checkout. i
quickly tested it and it works.
restore never creates a version (unless you are doing simple versioning).

if this does not work for you, please create a jira issue, and
optionally a test case.

regards, toby

On Wed, Jun 9, 2010 at 2:10 PM, Dieter Wachters
<dieter.wachters@lettergen.com> wrote:
> 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