[dokuwiki] Re: Changelog rewrite

  • From: Ben Coburn <btcoburn@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 3 Aug 2006 13:34:23 -0700


On Aug 3, 2006, at 5:55 AM, Kasper Sandberg wrote:

On Tue, 2006-08-01 at 10:46 -0700, Ben Coburn wrote:
While writing the new changelog code, I would find it useful to have
some "real-world" information on the size of large changelogs and their
average line length. If you have a large changelog file, please reply
directly to me with these two details.


1) size of the changelog file (in bytes)
9624
2) number of lines in the changelog file
141

forgive my writing here, instead of to you personally, however i have a
few thoughts about a new changelog system.
personally i dont have speed problems with my wiki, and as you can see,
my changelog is fairly small(yet).

im not sure what exactly would be the best approach to creating a new
system, however i do have a few things i hope you can consider.

1: the changelog system could keep the "wiki history", perhaps in a
separate file? what i mean is, well.. im not exactly sure how to explain
what i mean, but here goes:
if i create a page called apache in the namespace servers, giving me
"servers:apache", and then after 10 revisions, "move" this page to
"hosting:apache", then later create servers:apache again, then the
history should know that this is a new article, and then, an admin
plugin to move a page and changelog could be created. (disclaimer: this
is just a thought, however i would like a move page admin plugin)




DokuWiki can almost support this kind of tracking already. Data remains in the changelog and attic after a page is removed so a create, delete, recreate cycle can already be traced. As far as I know, "real"[1] page moves are not officially supported.


I think this is a good time to add an explicit log line type to the changelog format. This will make it easier to track more page related events. I would change the format from [2]:
<date>\t<ip>\t<page_id>\t<user>\t<is_minor><summary>


to [2]:
<date>\t<ip>\t<type>\t<page_id>\t<user>\t<summary>\t<extra>

All single character <type> values are reserved for the DokuWiki core, while multi-character <type> values are allowed for experimental and user defined log line types. Note that <type> is case sensitive. The <type> field is to be tested with === not substr.

The current list of core types would include:
C    create
E    edit
e    minor edit
D    delete

Types that may be added later:
M    moved, <extra> is destination <page_id>
R    reverted, <extra> stores the revision <date>
     to which the page was reverted.

The <type> specific data is stored in <extra> so that <summary> is always available to store comments about why the action was taken.

[1] Not create page, delete, and recreate somewhere else.
[2] Note, <summary> is indexed in the log line array as 'sum'.

Regards, Ben Coburn


------------------- silicodon.net -------------------

--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: