[Pmwiki-users] Edit / Lock Pages

Christian Ridderström chr
Tue Jan 27 18:09:10 CST 2004


On Tue, 27 Jan 2004, Patrick R. Michaud wrote:

> Yes, this part is easy--it's conflict detection.  The real question is, 
> what should happen once a conflict has been detected?

We could check and see how the other wiki-engines handle this. MoinMoin 
simply prints this message when a conflict is detected:

	Sorry, someone else saved the page while you edited it. 

	Please do the following: Use the back button of your browser,
	and cut&paste your changes from there. Then go forward to
	here, and click EditText again. Now re-add your changes to the
	current page contents.

	Do not just replace the content editbox with your version of
	the page, because that would delete the changes of the other
	person, which is excessively rude!

The changes are not accepted, and you're supposed to do your changes
again basically. People with experience from other wikis maybe know of 
better ways?

> > Note: A file lock is probably needed just before writing the changes, i.e. 
> > to make sure that someone else doesn't manage to write in the small amount 
> > of time between getting the mtime and starting to write :-)
> 
> PmWiki already does file locking to make sure this doesn't happen--
> this is the purpose of the .flock file.

Oh, I've never noticed that before. Is it global, i.e. one lock file
for an entire directory?

/Christian

-- 
Dr. Christian Ridderstr?m, +46-8-768 39 44       http://www.md.kth.se/~chr




More information about the pmwiki-users mailing list