[dokuwiki] darcs changes 2006-08-31

  • From: andi@xxxxxxxxxxxxxx (Andreas Gohr)
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 31 Aug 2006 04:00:02 +0200 (CEST)

Good Morning!

This are the darcs changes for DokuWiki committed
yesterday. Please test them and report bugs.

---------------------------------------------------------------------
Wed Aug 30 23:04:59 CEST 2006  Andreas Gohr <andi[at]splitbrain.org>
  * conflict resolution for memory cache init

Wed Aug 30 20:27:53 CEST 2006  Ben Coburn <btcoburn[at]silicodon.net>
  * scalable changelog redesign
  This patch provides a rewritten changelog system that is designed to run
  efficiently on both small and large wikis. The patch includes a plugin to
  convert changelogs from the current format. The conversion is
  non-destructive and happens automatically. For more information on the new
  changelog format see "http://wiki.splitbrain.org/wiki:changelog";.
  
  Structure 
  In short the changelog is now stored in per-page changelog files, with a
  recent changes cache. The recent changes cache is kept in
  "/data/meta/_dokuwiki.changes" and trimmed daily. The per-page changelogs
  are kept in "/data/meta/<ns>/<page_id>.changes" files. To preserve
  revision information for revisions stored in the attic, the "*.changes"
  files are not removed when their page is deleted. This allows the full
  life-cycle of page creation, deletion, and reversion to be tracked.
  
  Format
  The changelog line format now uses a general "line type" field in place of
  the special "minor" change syntax. There is also an extra field that can
  be used to store arbitrary data associated with special line types. The
  reverted line type (R) is a good example. There the extra field holds the
  revision date used as the source for reverting the page. See the wiki for
  the complete syntax description.
  
  Code Notes
  The changelog functions have been rewritten to load the whole file only if
  it is small. For larger files, the function loads only the relevant
  chunk(s). Parsed changelog lines are cached in memory to speed future
  function calls.
  
  getRevisionInfo
  A binary search is used to locate the chunk expected to contain the
  requested revision. The whole chunk is parsed, and adjacent lines are
  optimistically cached to speed consecutive calls.
  
  getRevisions
  Reads the changelog file backwards (newest first) in chunks until the
  requested number of lines have been read. Parsed changelog lines are
  cached for subsequent calls to getRevisionInfo. Because revisions are read
  from the changelog they are no longer guaranteed to exist in the attic.
  
  (Note: Even with lines of arbitrary length getRevisionInfo and
  getRevisions never split changelog lines while reading. This is done by
  sliding the "file pointer" forward to the end of a line after each blind
  seek.)
  
  isMinor
  Removed. To detect a minor edit check the type as follows:
  $parsed_logline['type']==='e';
  (The old method signature is incompatible with the new changelog format 
  that stores an explicit logline type.)
  
  parseChangelogLine
  Added. Parses a line in the new changelog format into an associative 
  array. See the wiki for changelog syntax details.
  
  array_dichotomic_search and hasTimeStamp
  Removed because the new changelog system does not require them.
  
  saveMetadata
  Refactored and removed. This code was rolled into addLogEntry because the 
  meta data now caches the current log line, and because it was only being 
  called from saveWikiText (which calls addLogEntry).
  
  html_revisions
  Now paginates revisions with the same "page size" as recent changes.
  
  INFO (global var)
  The page metadata is now stored in the $INFO global as $INFO['meta']. The
  parsed changelog line for the current page revision is stored in the
  metadata as 'last_change', so to get the current revision 
  use $INFO['meta']['last_change'].
  
  runTrimRecentChanges
  Used in the indexer to limit the size of the recent changes changelog
  cache. The cache is trimmed to the latest $conf['changes_days'] days, or
  one "page" of changes on inactive wikis. The 'changes_days' setting is a
  new configuration parameter added for this purpose. It takes an integer
  value of days because the changelog cache is trimmed (at most) once every
  24 hours. This function also triggers a private action event to import the
  old changelog as needed.
  
  importoldchangelog (plugin)
  Used to import and convert the old changelog. Per-page changelog files are
  created for all page-ids in the changelog. Recent changes are added to the
  recent changes cache. The changelog importer also reconstructs changelog
  information for revisions in the attic that are missing changelog lines.  
  These reconstructed changes use the default "reverted" summary string
  surrounded with parentheses as their summary. For example "(old revision
  restored)". Changes reconstructed from the attic will also be missing the
  author's IP address, user name, and summary which were lost with the
  missing changelog line. The importoldchangelog plugin will run
  automatically without any need for user intervention. (Note: Very large
  wikis running on servers with php in "safe mode" may run out of time
  because the execution time limit can not be increased by the code.)
  
  do=check (dokuwiki act)
  The "check" action will now report if an old changelog exists and is being
  or has been imported. If the import ran out of time, "check" should issue
  a warning that the import did not finish. To try the import again remove
  the "/data/meta/_dokuwiki.changes" and "/data/meta/_dokuwiki.changes_*"
  files. (It is also possible to do the import on another server that is not
  in "safe mode" and copy the "/data/meta" directory to the "safe mode"
  server.)
  
  NOTE TO WIKI USERS: Do not delete the "/data/meta" directory. It now 
  contains changelog information that can not be regenerated from the 
  other wiki data.
  
---------------------------------------------------------------------

Single patches can be downloaded from
http://dev.splitbrain.org/darcs/index.cgi/dokuwiki/?c=patches

Bye,
your darcs changlog mailer 


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

Other related posts: