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 Julien Charbon <ju...@neurosoft.fr> on 2002/08/23 17:27:57 UTC
Lock/Unlock & Auto-Versioning
Hi all,
i'am trying WebDAV auto-versioning in mode "checkout-unlocked-checkin".
When I do this sequence of actions all work fine :
$ cadaver http://localhost:8080/slide/trainee/files/restricted
Looking up hostname... Connecting to server... connected.
Authentication required for Slide DAV Server on server `localhost':
Username: julien
Password:
dav:/slide/trainee/files/restricted/> ls
Listing collection `/slide/trainee/files/restricted/': collection is empty.
dav:/slide/trainee/files/restricted/> lls
NotVersioned.txt Versioned.txt
dav:/slide/trainee/files/restricted/> ls /slide/history
Listing collection `/slide/history/': collection is empty.
dav:/slide/trainee/files/restricted/> put Versioned.txt
Uploading Versioned.txt to `/slide/trainee/files/restricted/Versioned.txt':
Progress: [=============================>] 100.0% of 13 bytes succeeded.
dav:/slide/trainee/files/restricted/> ls /slide/history
Listing collection `/slide/history/': succeeded.
Coll: 1 0 Aug 23 16:52
dav:/slide/trainee/files/restricted/> ls /slide/history/1
Listing collection `/slide/history/1/': succeeded.
1.0 13 Aug 23 16:52
dav:/slide/trainee/files/restricted/>
Great ! Now continue with the same sequence bracketed with lock/unlock. [WebDAV permit
to lock inexistant resource for reserve the resource name].
dav:/slide/trainee/files/restricted/> lock NotVersioned.txt
Locking `NotVersioned.txt': succeeded.
dav:/slide/trainee/files/restricted/> discover NotVersioned.txt
Discovering locks on `NotVersioned.txt': (reconnecting...done)
Lock token <opaquelocktoken:262fb00c77596ea50e4292362e8c6aad>:
Depth infinity on `http://localhost:8080/slide/trainee/files/restricted/NotVersioned.txt'
Scope: exclusive Type: write Timeout: 604776 seconds
Owner: /slide/users/julien
dav:/slide/trainee/files/restricted/> put NotVersioned.txt
Uploading NotVersioned.txt to `/slide/trainee/files/restricted/NotVersioned.txt': (reconnecting...done)
Progress: [=============================>] 100.0% of 36 bytes succeeded.
dav:/slide/trainee/files/restricted/> unlock NotVersioned.txt
Connecting to server... connected.
Unlocking `NotVersioned.txt': succeeded.
dav:/slide/trainee/files/restricted/> discover NotVersioned.txt
Discovering locks on `NotVersioned.txt': (reconnecting...done) no locks found.
dav:/slide/trainee/files/restricted/> ls
Listing collection `/slide/trainee/files/restricted/': (reconnecting...done) succeeded.
NotVersioned.txt 36 Aug 23 17:10
Versioned.txt 13 Aug 23 16:51
dav:/slide/trainee/files/restricted/> ls /slide/history
Listing collection `/slide/history/': succeeded.
Coll: 1 0 Aug 23 16:52
dav:/slide/trainee/files/restricted/>
Argh ! There is no :
Coll: 2 0 Aug 23 17:10
In fact, if you read the source of jakarta slide when somebody put a file for the first time
on the slide server, this file is put under version control by code :
...
catch (ObjectNotFoundException e) {
...
// check if the resource should be put under version-control
if ( Configuration.useVersionControl() && AUTO_VERSION_CONTROL ) {
versioningHelper.versionControl(resourcePath);
}
...
}
...
in PutMethod.java in package org.apache.slide.webdav.method.
So when somebody lock first a resource there is no ObjectNotFoundException, because the
object is create by the fisrt lock, and there is no versionControl() call on this resource.
My questions are :
o This is normal behavior or not ?
o If not where make change ? In PutMethod.java or in UnlockMethod.java.
Thanks for your reponses.
I use Slide 2.0.0 from CVS on Tomcat 4.1.8.
Julien Charbon.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>