Question
I'm migrating data from an old server based on a different platform (slashcode) by cut/paste of the HTML into a TWiki topic. I'd like the %REVINFO% tag to show the date of the original document instead of the date the information was imported. Is there any way to backrev an article when saving it, (or from the shell using
RCS commands) so that I preserve the date/time from the original article?
Environment
--
GeorgeClark - 22 May 2006
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
There are three sources of dates for topics; the file date, the date in
RCS, and the date in the %META tag inside the topic. Because you are trying to rewrite history, what you need is the
RCS date.
Each time you edit a TWiki topic, and new "revision" of that topic is added to the .txt,v file associated with the topic. So this procedure should work:
- Create the new topic, pasting in what you want from slashcode
- manually edit the topic.txt,v file you will find in the TWiki database. Modify the date you see in there (under the revision number, which will probably be 1.1)
- You will probably have to hack permissions
- edit the topic in TWiki and save a new version.
Version 1.1 will now be permanently stamped with the date you chose.
--
CrawfordCurrie - 22 May 2006
Thanks for the suggestions, however this does not appear to work, at least not in the way that I understand it. The story I'm changing was dated 5/20/2006.
- I edited the
story.txt,v file and modified the RCS date back to Feb. 25, in the 3 revisions that were recorded in RCS.
- I edited the story and saved it to create a new rev. and it was unfortunately dated to today's date.
- I re-edited the ,v file, and the previous revision dates were preserved, but the latest version had indeed picked up the today's date.
- I also viewed the old revisions in TWiki and it showed the original dates from May and not the February date.
I'm guessing that the TWiki web interface is displaying the date from the %META tag in the rcs file and not the
RCS revisions.
Once I figure out how to generate a correct date="nnnnnnnn" string, I'll see synchnonizing the dates in the %META tag and the
RCS revision log helps.
--
GeorgeClark - 23 May 2006
I used
print TWiki::Time::parseTime( '2006.02.25.10.00.00' ); in a small perl script to convert a date back to the epoch string. I then edited that string into the rev data, and the %META tag in both the
.txt and
.txt,v files.
That seems to work, so I suppose I can write a small perl script to update those fields in a topic to back-date it.
--
GeorgeClark - 23 May 2006