[Zope] Versions and write conflicts

Fernstrom, Christer Christer.Fernstrom@xrce.xerox.com
Thu, 12 Apr 2001 16:20:14 +0200


Well, that should work, provided all writing is encapsulated in scripts. But if you present management screens to users, there is no guarantee they will check this time stamp property before they do their first save.

BTW. Thanks Tim for helping me getting started with the programmatic management of versions last week.

christer

> 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