hi,
this is how it's specified by jsr283. see comments about restore and
simple-versioning http://www.day.com/specs/jcr/2.0/15_Versioning.html

mainly:

15.7.1 Simple vs. Full Versioning Before Restore
Under simple versioning, if N is checked-in then it is automatically
checked-out before the restore is performed.
....

15.7.7 Simple vs. Full Versioning after Restore
Under simple versioning N is automatically checked-in.
...

But i can see the need for a 'cancel checkout' also for simple
versioning. maybe jsr283 is not too clear about that, but IMO a
restore to the base version should not create a new version for simple
versioning, neither. because it makes no sense.

maybe you can create a jira issue for this so we can follow up on this?

regards, toby



On Thu, Jun 10, 2010 at 8:58 AM, Dieter Wachters
<[email protected]> wrote:
> Hi,
> I am using simple versioning. Can this also be considered an issue or is this 
> intended behavior for simple versioning?
>
> Regards,
>
> Dieter
>
>
> Dieter Wachters
> Architect
> direct:
> [email protected]
>
> 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 
> [email protected]. If you are not [email protected], you 
> should not disseminate, distribute or copy this e-mail. Please notify 
> [email protected] 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: Tobias Bocanegra [mailto:[email protected]]
> Sent: donderdag 10 juni 2010 12:09
> To: [email protected]
> Subject: Re: Cancel checkout
>
> 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
> <[email protected]> wrote:
>> No that creates a new version, which I don't want.
>>
>>
>> Dieter Wachters
>> Architect
>> direct:
>> [email protected]
>>
>> 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 
>> [email protected]. If you are not [email protected], you 
>> should not disseminate, distribute or copy this e-mail. Please notify 
>> [email protected] 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:[email protected]]
>> Sent: woensdag 9 juni 2010 12:47
>> To: [email protected]
>> 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
>> <[email protected]> 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
>>
>>
>
>

Reply via email to