Question
Looking for a
TWikiVariable that will display links to the
RCS diffs between current and previous revision.
For our weekly meeting, we edit the same MeetingMinutes topic over & over again. The
PatternSkin has a link to
Revisions: at the bottom of the page. However, not all readers are TWiki-savvy.
I'd like to put a quick link to
diffs from the last meeting minutes at the top of the page. I tried to cheat by sneaking a peak at
../templates/view.pattern.tmpl
The %REVISIONS% variable used in the template does not work when used from the edit box of a
TWikiTopic. Just appears in the page as %REVISIONS%

Is there a quick fix that lets me put links to
rdiffs anywhere in the topic that I choose, instead of only those places provided by the Skin ?
Environment
--
KeithHelfrich - 22 Dec 2004
Answer
I don't think so. You could use links like this though:
[%SCRIPTURL%view%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=1.32][Meeting on 2004-12-17]]
However you may be better off creating a new topic for each meeting. Take a look at
Sandbox.MeetingMinutes. If that is too complecated then here's a more complicated setup with a simpler workflow. It should allow you to create a new topic using the previous meeting as a template.
Put this in a topic called
MeetingMinutes:
<form name="new" action="%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/%WEB%/">
%SEARCH{"%TOPIC%20[0-9]+x" scope="topic" regex="on" nosearch="on" nosummary="on" nototal="on" reverse="on" format=" * $topic: $pattern(.*?\-\-\+\!\![^\n\r]*?Minutes[^\n\r]+?[\,\-]+([^\@\-\<\n\r]+).*) - $wikiusername - [[%SCRIPTURL%/rdiff%SCRIPTSUFFIX%/%WEB%/$topic][$date]] - $rev"}%
* | *New Meeting Topic* | <input type="text" name="topic" value="%TOPIC%%SERVERTIME{"$yearx$mox$day"}%" size="32" /> |
| *Template* | <input type="text" name="templatetopic" value="%SEARCH{"%TOPIC%20[0-9]+x" scope="topic" regex="on" nosearch="on" nosummary="on" nototal="on" reverse="on" limit="1" format="$topic"}%" /> \
<input type="hidden" name="topicparent" value="%TOPIC%" /> \
<input type="submit" value="Create New Minutes" /> |
</form>
Note that it uses the %TOPIC% variable so it relies on being in the
MeetingMinutes topic.
It should look something like this:
--
SamHasler - 22 Dec 2004
You can use
%REVINFO{"$rev"}% and some
SpreadSheetPlugin magic. Edit the topic to see how.
r1.4
> r1.3
> r1.2
There is a catch though. Currently there is no formula to repeat something until a condition is met, so you get only a fixed number of diff links. We would need a new
$WHILE(condition, action) formula.
--
PeterThoeny - 23 Dec 2004
Peter, Sam, thanks .. some very fancy stuff recommended there with the
SpreadSheetPlugin.
However, for now and for simplicity, I've just put a hard-coded link to the
rdiff Total Page History at the top of the meeting minutes.
It is actually quite advantageous in a company of our size to use the same
MeetingMinutes topic over and over, again & again. For one, the
RCS is very helpful. And also folks can bookmark the one
MeetingMinutes page and always find them there.
I've not ever toyed with the
SpreadSheetPlugin, but when I do I will be sure to come back and try your recommended magic.
Thanks.
--
KeithHelfrich - 23 Jan 2005