We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
You are here: TWiki> Plugins Web>IncludeRevisionPlugin (20 Apr 2003, PeterThoeny)
Tags:
rendering1Add my vote for this tag version_control1Add my vote for this tag create new tag
, view all tags

IncludeRevisionPlugin

Adds to the functionality of the

Warning: Can't find topic ""."" tag by allowing includes of revision #'s and revision Dates.

For an example, my department has conference calls on Mon, Wed, and Fri of every week to update the rest of the group on the lastest developments of our projects. We all use TWiki to have a meeting agenda (the Meetings web).

I got tired of waiting for the lock to be released on the current meeting agenda page (we keep an archive of topics like MeetingNotes20011029, etc) because everyone else was updating at the last minute also, so I decided to create a page on my own web and edit that, since I knew that I would be the only one that would update it.

For awhile, I was having to copy and paste my notes into the meeting page because of the archival notes were needed, so a normal INCLUDE would not work, since the notes for that meeting would disappear as soon as I changed that file.

One day I realized that I can pull any revision by using the Web/TopicPage?rev=1.#. Since I change the same file over and over again, it already had a history in rcs, so I decided to use that to my advantage by finding out a way to include it.

I understand that I can just put a link in MeetingAgenda20011029 to Web/TopicPage?rev=1.25 , but I'm more lazy than that. I figure that since I have a date in the Topic name, I could use that to pull the correct revision, so I can put that into the Meetings web templatem, so i never have to modify the meetings page again. ever.

I had to modify a couple of files in order to do this, but rcs already supports this feature, so why not have it in TWiki.

Take a look at my diffs to see what was changed.

I also created a MeetingDatePlugin? that just takes the topic name and pulls the date out of it, which is used for my example above.

Syntax Rules

  • %INCLUDEREV{Web.TopicPage,1.3}%
  • %INCLUDEREV{Web.TopicPage,D2001-10-29T19:00Z}%

IncludeRevisionPlugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %INTERWIKIPLUGIN_SHORTDESCRIPTION%

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Adds to the functionality of the %INCLUDE% tag by allowing includes of revision #'s and revision Dates.

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

  • My own setting:
    • Set HOWTO = got it!

Plugin Installation Instructions

  • Download the ZIP file from the Plugin web (see below)
  • Unzip IncludeRevisionPlugin.zip in your twiki installation directory. Content:
File: Description:
data/TWiki/IncludeRevisionPlugin.txt Plugin topic
data/TWiki/IncludeRevisionPlugin.txt,v Plugin topic repository
lib/TWiki/Plugins/IncludeRevisionPlugin.pm Plugin Perl module
  • patch lib/TWiki/Store.pm and lib/TWiki.cfg with the attached diffs
  • Check this topic here if the installation was successful
  • Test if the plugin is correctly installed:
    • %INCLUDEREV{TWiki.WebHome,1.3}%

Plugin Info

Plugin Author: JustinHickman
Plugin Version: 29 Oct 2001
Change History: ?? ??? 2001: Added...
29 Oct 2001: Initial version
CPAN Dependencies:  
Other Dependencies:  
Perl Version: 5.0
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/IncludeRevisionPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/IncludeRevisionPluginDev

Related Topics: TWikiPreferences, TWikiPlugins

-- JustinHickman - 29 Oct 2001

Topic attachments
I Attachment Action Size Date Who Comment
zipzip IncludeRevisionPlugin.zip manage 5.7 K 29 Oct 2001 - 22:59 JustinHickman  
elsediff Store.diff manage 1.5 K 29 Oct 2001 - 23:13 JustinHickman Modification to RCS stuff
elsediff TWiki-cfg.diff manage 0.8 K 29 Oct 2001 - 23:12 JustinHickman small modification to the TWiki.cfg file
Topic revision: r8 - 20 Apr 2003 - 00:32:59 - PeterThoeny
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback