[Pmwiki-users] Re: Re: PmWikiDraw and multiple editors?
Thu Dec 16 06:48:56 CST 2004
On Thu, 16 Dec 2004, Ciaran wrote:
> In PmWiki2 its somewhat better, the changes are merged.
I'd say it is *much* better in PmWiki 2. Not only are you informed that
someone else edited and saved the page while you were working on it, you
are also immediately shown what they did. In addition, the system is
supposed to automatically merge the changes so that you don't have to do
anything manually... this is the theory anyway, I haven't had any
experience with it yet.
> I'm not convinced that there is *any* way with the current uploads
> interface I can achieve similar behaviour.
Well, I think we basically only need something in pmwiki that returns a
timestamp that says when a file was 'last modified'. This can then be used
to determine if someone else has saved the drawing while you were editing
it. If no one else has edited it, pmwikidraw can go ahead and upload the
Here's one way it could work, the process below could definitely be
* The user clicks on an edit link and DRAW (=PmWikiDraw) starts.
* DRAW retrieves the drawing's timestamp (through some extra mechanism)
* DRAW downloads the drawing
* DRAW retrieves the drawing's timestamp again, to verify it is
unchanged compared to when you started downloading it.
* The user modifies the drawing and press the save button
* DRAW asks for a temporary lock (one that'll automatically vanish within
a minute or so)
* DRAW retrieves the timpstamp and compares it to the old timestamp:
** If the timestamp is different, this means someone else has saved
a new version of the drawing. => Go ask the user for what to do.
** If the timestamp is the same, DRAW goes ahead and uploads the changes,
* DRAW releases the lock
The extra mechanisms that'd be needed in PmWiki here are:
* Retrieve timestamp of an uploaded file => requires adding an action
* Be able to create a lock with an automatic timeout => requires adding a
modified upload mechanism that only uploads if so allowed by the lock
> The best I hope to offer is the version history, which would enable a
> user to see there were multiple changes made.
Eh.. how could you detect this?
> I can't see Pm modifying PmWiki to allow for this requirement but if you
> both want to discuss it and come up with a way in which PmWikiDraw can
> use it, then I'm happy to spend some time (and believe me it will take a
> fair amount of effort) to get it working. And a change like this would
> definately break backwards compatibility!
In my experience Patrick allows most anything to go into cookbooks... I've
written my own extended upload version for instance (I wanted a directory
structure). So I don't think that'd be a major problem.
Time/effort is a problem of course... my suggestion is that we initially
just discuss what we'd like, possibly specifying different solutions such
* Version history
* Detection of multiple editing
* Automatic merging
Btw... would it be possible to use a wiki page as the source of a drawing?
That way maybe we could take advantage of existing solutions?
Christian Ridderstr?m, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users