create new tag
, view all tags
The TWikiTopicUpgradeScript could distinguish between different types of actions to taken on upgrade, depending on the topic.

At work we did something in that direction: We have a TWiki application distributed over several webs. It is a TWikiForms based database with one master web and participating webs. The master web has all forms, reports and help pages defined, some of which need to be replicated to the participating webs. Some pages need to be copied only once to the participating webs, some topics need to copied over existing topics. Each topic contains a keyword identifying the type of sync action:

  • TopicUpdate(copy), or
  • TopicUpdate(mirror)

The "(copy)" action indicates that the topic needs to be copied only once; "(mirror)" indicates an overwrite action on sync. The TopicUpdate has a SEARCH that lists all topics with checkboxes and links to see diffs, produced by a Plugin. Accepting default state of checkboxes and pressing the Update button is all that's needed to synchronize the topics into the participating webs.

Non-working example illustrating this:

Update Action Diff Topic
mirror diff AbcForm
mirror diff AbcReport
mirror diff AbcHelp
copy diff UserDefinedParts
<input type="submit" value="Update all checkmarked topics"

Using this idea, all official topics in the TWiki web could contain a TopicUpdate(<action>) keyword and the installer could upgrade an existing installation intelligently based on this information.

Possible types of actions on a topic:

  • TopicUpdate(copy) -- copy once only
  • TopicUpdate(mirror) -- copy if not exist, else create new top revision with content of package
  • TopicUpdate(prefs) -- copy if not exist, else create new top revision with content of package, but retain the "Set" preferences settings (and if possible also user defined settings) of the installation.

Heck, the TWiki.TopicUpdate topic could even be part of the TWiki distribution so that administrators can see the diffs of selected topics compared to the latest TWiki.org version, then update the docs selectively. smile

Here is a simulated form of the TWiki.TopicUpdate topic, non-functional:

Update Action Diff Topic
mirror diff AccessControl
mirror diff AdminSkillsAssumptions
mirror diff AdminTools
copy diff TWikiRegistration
prefs diff TWikiPreferences
<input type="submit" value="Update all checkmarked topics"

-- PeterThoeny - 13 Jan 2004

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2008-08-25 - TWikiJanitor
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.