[pmwiki-devel] Subversion PageStore Design
kat_lists at katspace.homelinux.org
Mon Nov 12 15:33:54 CST 2007
Here's some ideas about a Subversion-based PageStore. Hopefully we can
apply our collective brain-power to this...
A subversion PageStore would have to implement some or all of the
PageStore functions, to wit:
Obviously, since a subversion PageStore would still be file-based, then
one could still use the normal PageStore versions of 'pagefile',
'exists' and 'ls'.
So that leaves 'read', 'write' and 'delete'.
One suggestion for a subversion pagestore was to have the page content
in the file, and all the attributes as subversion properties.
This would make reading a matter of
- reading the file
- listing the svn properties for the file
Writing would be a matter of
- writing the file
- updating the svn properties for the file
It would probably make sense to have some sort of prefix for the
properties, such as "pmwiki:". So the "author" attribute would be
"pmwiki:author", for example.
Deletion would be a matter of doing a svn del on the file.
A few questions remain, however.
- How would one do diffs for "history" pages? I'm not quite clear how
pmwiki does that stuff, I haven't looked.
- When would one do commits?
- When would one do updates?
- How would one know what repository to make commits to?
- How would one deal with creating/committing new directories (for wiki page
formats which have pages in separate directories for example).
The "when would one do commits?" question has a number of
ramifications, including conflict resolution, and whether or not one
could operate "detached" on a laptop (as someone suggested in the thread
on the pmwiki list). I can see a number of problems arising.
A. Commits are done immediately after writing and updating properties.
However, this isn't an atomic action, so how do you prevent someone else
overwriting your file before you do the commit? I suppose the standard
pmwiki conflict-resolution would do for that.
However, this doesn't allow work to be done detached on a laptop.
So maybe there would have to be some sort of global option which could
be turned on to disable commits while that person is working detached,
and then they would have to commit by hand when they were attached
B. Commits aren't done automatically. This allows pages to be worked on
on a laptop, but otherwise seem a pretty bad idea, since one would lose
all the versioning that one wished to do with subversion!
Likewise, "when would one do updates?" could have some conflict problems
-- does one do an update just before one reads a page? After one does a
_--_|\ | Kathryn Andersen <http://www.katspace.com>
/ \ |
\_.--.*/ | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha! | -> Earth -> Sol -> Milky Way Galaxy -> Universe
More information about the pmwiki-devel