锁定并发编辑

如果两个人试图同时编辑相同的维基网页,就会出现冲突。一种简单的处理方法是,当编辑者试图编辑一个正在被其他人编辑的网页时,向其显示冲突警告。

Moin的编辑锁定系统就具有这个功能。锁定包括三个级别:warnlockNone(关闭)。

如果你将Moin配置为warn,当有人试图编辑正在被编辑的网页时,他们会看到一条警告信息,要求他们等到当前编辑完成之后再继续。

Moin可以被配置为在编辑过程中lock(锁定)页面。如果有人试图边界正在被编辑的网页,他们会看到一条信息,说明该网页已经被锁定,直到当前编辑者完成之后,他才可以编辑。

这个功能复杂的地方在于编辑工作可能开始却没有结束。比如:

这可能导致网页处于永远警告或者永远锁定状态。因此,warnlock都有一个timeout(超时)功能。在指定的时间之后,该功能就超时终止了。注意,当你预览时,计时器会重新计时。如果你在编辑网页,预览表明你仍然在编辑网页,计时器会重新启动。如果你离开或者退出这个网页的时间超过预设值,那么编辑锁定就会失效,其他人就可以自由编辑这个网页了。

配置

edit_locking 变量控制着编辑锁定系统的行为。它可以设定为下列值:

取消编辑

根据上述关于超时功能的描述,如果你打开了编辑锁定功能,建议取消编辑时,总是使用取消按钮来取消编辑!

例子

Sample interaction of JohnMiller and JaneDoe...

no locking (None)

JohnMiller starts editing a page and JaneDoe thinks she'll edit the same page. She has no idea that someone else is editing the page so they both edit away and hit save. It doesn't matter who started first and did the most editing, whoever hits save changes first will have their changes committed and the unfortunate 2nd editor will have to try and merge their changes in or lose them.

edit warnings (warn)

JohnMiller starts editing a page and JaneDoe thinks she'll edit the same page. When she hits edit she'll see a warning telling her that someone else got there first. If she is polite she'll leave the page, but she can still save before John and he may lose his changes.

edit locking (lock)

JohnMiller starts editing a page and JaneDoe thinks she'll edit the same page. When she hits edit she'll see a warning telling her that someone else got there first and the page is locked. She will have to wait for the page to become available.

帮助-编辑锁定 (zuletzt geändert 2009-11-15 23:40:38)