[Zope] Versions and write conflicts

Tim Cook tim@freepm.org
Thu, 12 Apr 2001 08:24:44 -0500


"Fernstrom, Christer" wrote:

> I have tried to work around the problem by programatically create a version, put the user in the version, and - before opening the management screen - do a manage_edit on the document. This all works fine, but strangely the manage_edit doesn't seem to lock the file, so although it relieves the user of the burden to think about opening a version before start making changes, the problem mentioned above still remains.
> 

Unfortunately I found the same thing. Andy made the suggestion to
use a (rather old) technique to open a document, write a
date/time stamp to a property and then test for the same
date/time stamp before writing the changes. 

While this can cause some problems in a heavy editing situation
where several users may edit something, I don't have the issue.
It's not perfect, but it does work for me.

The transaction machinery is available in the source but I
haven't taken the time to try and use it. 
Probably should though.

HTH,
-- 
Tim Cook, President - FreePM,Inc. 
http://www.FreePM.com Office: (901) 884-4126
ONLINE DEMO: http://www.freepm.org:8080/FreePM