[pmwiki-users] MD5 checksums or version control (was: Re:Avoiding simultaneous edits)

Patrick R. Michaud pmichaud at pobox.com
Wed Sep 20 15:43:29 CDT 2006


On Wed, Sep 20, 2006 at 09:30:37PM +0100, Américo Albuquerque wrote:
> It would be handy if we could make a pagelist of md5. We could use it to 
> synchronize wiki source pages.

Do you need a hash for the entire page (attributes and all) or
just the page contents (text?).  If just the page contents, the
md5 could be easily saved as a page attribute.  If the entire
page, then the md5 takes some time to dynamically generate from 
each page file.

Or do you simply want some sort of value that is guaranteed to change
whenever a page is modified in any way?  That could be easily added.

Pm



> On Wed, 20 Sep 2006 12:56:05 -0500, Patrick R. Michaud wrote:
> > On Wed, Sep 20, 2006 at 01:12:25PM -0400, Neil Herber wrote:
> > > At 2006-09-20 11:42 AM -0500, Patrick R. Michaud is rumored to have 
> said:
> > > >And, perhaps we really need the extended Attach: markup, so
> > > >that someone can do something like:
> > > >
> > > > Attach:foo.txt"%md5"
> > > >
> > >
> > > Oh and please something like:
> > >
> > > Attach:foo.txt"%md5","size"
> >
> > We really need to keep it to one set of quotation marks, so it
> > ought to be something like:
> >
> > Attach:foo.txt"%md5 %size"
> >
> > I just haven't figured out the substitution markup that makes
> > sense for this. I can envision doing one of:
> >
> > Attach:foo.txt"%md5 %size"
> > Attach:foo.txt"$md5 $size"
> > Attach:foo.txt"{md5} {size}"
> >
> > Unfortunately(?), one thing that *won't* work is the page variable
> > markup, as in , because page
> > variable substitutions take place before Attach: links. Plus,
> > it confuses attachments with pages, and people seem to get
> > those confused enough already.
> >
> This can be done if you set the attach to happen before the variable 
> markup  and then just apply the variable regexp to it inside the Attach 
> resolving function.
> The attach function would get 'Attach:foo.txt"{$md5} {$size}"' instead 
> of getting the text with the variables replaced
> 
> 
> 
> 




More information about the pmwiki-users mailing list