Item2312: Revisions Don't Save Included Topics
Priority: Normal
Current State: No Action Required
Released In:
Target Release: n/a
Applies To: Engine
Component:
Branches:
Whenever a new revision is created and the old one is saved, foswiki does not save the content in any topics included with the %INCLUDE macro with the old revision. This is a serious problem. Take this example:
1. On Oct 30th, you create 2 topics, MainTopic and InnerSection. MainTopic contains
Main Oct 30: %INCLUDE{InnerSection}%
and InnerSection contains
Inner Oct 30
2. On Oct 31, you make some changes that result in a new revision to MainTopic and to InnerSection. MainTopic now contains
Main Oct 31: %INCLUDE{InnerSection}%
and InnerSection now contains
Inner Oct 31
3. If you look at MainTopic revision1 (the old revision), you'll notice that the content in it will be
Main Oct 30: Inner Oct 31
because the InnerTopic content has changed and MainTopic is just pulling the newest content in from InnerTopic.
Viewing an old revision can be misleading to the point of being useless if most of the content in a topic is pulled in from other topics via a %INCLUDE macro.
--
SteveLin - 30 Oct 2009
I think, this is more a feature-request than a bug. When you request an old revision of a topic, you get the old revision, but its rendered in the context of "now". Sure, for
INCLUDEs you can theoretically calculate the relevant revisions of the included topics and show them instead of the "most current" one.
But what about other macros? GMTIME? Or what about macros which include data from an external source?
If you depend on "correctly related" content, you may not use
INCLUDE and other macros, but have to make a static copy of your content.
Degrading this item to "Normal" and leaving it to somebody else with another opinion to close this item.
--
OliverKrueger - 31 Oct 2009
This effect is an interesting side effect of the use of a revisioning system, without using tagging/branching. Many users use it as a feature, in that the date being different indicates that the INCLUDEd topic may need an update - or just as possibly, is already correct, and needs no change.
I'm pretty certain that when you use
transclusion in Word - where you link documents together into master documents, or update a web site topic without updating all of them, that this effect is essentially the same.
That said, there are a number of us that are interested in configuration management style thinking, and how to apply it to Wiki's - using branches, tags and otherwise managing a
change set rather than single unrelated changes as we do now. I don't think anyone's actually sat down and done any coding for it though - and thinking about how to present the user interface usefully worries me.
So - are you interested in having a go at it? either way, this deserves a
feature proposal
--
SvenDowideit - 02 Nov 2009
The
INCLUDE works at it is speced and there is no bug
So we are in feature proposal land.
And I am not convinced that I would like a solution exactly as suggested
Maybe we need a feature where you can add a rev parameter to
INCLUDE which instead of beeing a number is a code that means current version of included topic and gets frozen as static value in the old revs when you save a topic. A bit like we know from the SVN $rev which is saved with the svn number and auto updates when saving.
I will no action this and encourage a feature proposal instead as there is no bug to fix
--
KennethLavrsen - 04 Nov 2009