You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Stefan Burkard <bu...@burknet.ch> on 2004/12/02 11:49:43 UTC

example for versioning

hi slide-users

i've got the situation that any new property-patch on a document creates 
a new version of the ressource. of course, because i have activated 
auto-versioning.

i found several hints in the mailarchive, but no concrete example how to 
  manage the creation of a new version with the checkin, checkout and 
versioncontrol-methods.

i'd like to do something like this:

- put a file in the repository (first time)
- patch several properties on it

and then, when a document with the same name arrives:

- *** save the first version ***
- put the new version in the repository
- patch several properties on it

my concrete questions:
- has anybody a code-example how to do this?
- and what values are needed in the auto-version-properties of domain.xml?

and a general question:
- has the property "auto-version" in domain.xml any function if the 
property "auto-version-control" is set to false?

thanks and greetings
stefan


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: example for versioning

Posted by Lixin Chu <li...@gmail.com>.
I guess what we want to know is:
1) how to config domain.xml and
2) how to use the API so that:

1) when a file is added, a new version will be created AND
2) when properties are changed, NO new version will be created.

I have been trying different configurations so far but still do not
know how to do it.


On Thu, 02 Dec 2004 09:26:03 -0500, Tim Frank
<tf...@registrar.uoguelph.ca> wrote:
> Stefan,
> 
> Not sure if I'm fully understanding what you are trying to do, but see
> comments inline below
> 
> Stefan Burkard wrote on 02/12/04 05:49 AM:
> >
> > i'd like to do something like this:
> >
> > - put a file in the repository (first time)
> 
> You would want to have the auto-version-control on.
> 
> > - patch several properties on it
> 
> You would need to checkout the resource first. This can be done by
> setting the auto-version to empty to force manual checkout/checkin. Or,
> you could use "checkout" so the resource is only checked out when a
> write is attempted but must be checked in manually.
> 
> > and then, when a document with the same name arrives:
> 
> I don't quite understand what you mean by "document with the same name",
> you would always be working on the checkedout version of the document
> with a given name.
> 
> >
> > - *** save the first version ***
> 
> This would be the checkin command.
> 
> > - put the new version in the repository
> 
> This would be another checkout as in the steps above to create another
> working copy.
> 
> > - patch several properties on it
> 
> Same as above.
> 
> > my concrete questions:
> > - has anybody a code-example how to do this?
> 
> I'm not sure if there is any explicit code, but you would be using the
> checkout, checkin, possibly uncheckout methods in the Slide Client API.
> 
> > - and what values are needed in the auto-version-properties of domain.xml?
> 
> I would recommend
> 
> <parameter name="auto-version-control">true</parameter>
> 
> and either
> 
> <parameter name="auto-version"></parameter>
> 
> or
> 
> <parameter name="auto-version">checkout</parameter>
> 
> to allow more manual control over the checkin process.
> 
> > and a general question:
> > - has the property "auto-version" in domain.xml any function if the
> > property "auto-version-control" is set to false?
> 
> Good question, I haven't tested this. I would take a wild guess and say
> possibly. In that you could set auto-version-control to false so that a
> resource is NOT automatically put under version control. However, if the
> command was issued manually, then the auto-version property might be
> applied to control how that resource is handled.
> 
> I hope that helps you a little bit or gives you some ideas to try.
> 
> Tim
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: example for versioning

Posted by Tim Frank <tf...@registrar.uoguelph.ca>.
Stefan,

Not sure if I'm fully understanding what you are trying to do, but see 
comments inline below

Stefan Burkard wrote on 02/12/04 05:49 AM:
> 
> i'd like to do something like this:
> 
> - put a file in the repository (first time)

You would want to have the auto-version-control on.

> - patch several properties on it

You would need to checkout the resource first. This can be done by 
setting the auto-version to empty to force manual checkout/checkin. Or, 
you could use "checkout" so the resource is only checked out when a 
write is attempted but must be checked in manually.

> and then, when a document with the same name arrives:

I don't quite understand what you mean by "document with the same name", 
you would always be working on the checkedout version of the document 
with a given name.

> 
> - *** save the first version ***

This would be the checkin command.

> - put the new version in the repository

This would be another checkout as in the steps above to create another 
working copy.

> - patch several properties on it

Same as above.

> my concrete questions:
> - has anybody a code-example how to do this?

I'm not sure if there is any explicit code, but you would be using the 
checkout, checkin, possibly uncheckout methods in the Slide Client API.

> - and what values are needed in the auto-version-properties of domain.xml?

I would recommend

<parameter name="auto-version-control">true</parameter>

and either

<parameter name="auto-version"></parameter>

or

<parameter name="auto-version">checkout</parameter>

to allow more manual control over the checkin process.

> and a general question:
> - has the property "auto-version" in domain.xml any function if the 
> property "auto-version-control" is set to false?

Good question, I haven't tested this. I would take a wild guess and say 
possibly. In that you could set auto-version-control to false so that a 
resource is NOT automatically put under version control. However, if the 
command was issued manually, then the auto-version property might be 
applied to control how that resource is handled.

I hope that helps you a little bit or gives you some ideas to try.

Tim

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org