Tags:
create new tag
view all tags

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

TWiki version: TWikiRelease04x00x02
TWiki plugins: SpreadSheetPlugin, BlackListPlugin, CalendarPlugin, CommentPlugin, EditTablePlugin, FortunePlugin, ImageGalleryPlugin, InterwikiPlugin, PreferencesPlugin, RenderListPlugin, SlideShowPlugin, SmiliesPlugin, TablePlugin, TagCloudPlugin, TagMePlugin, VotePlugin, WysiwygPlugin
Server OS: Gentoo Linux 2006.0 kernel 2.6.15-gentoo-r1
Web server: Apache 1.3.34
Perl version: 5.8.7
Client OS: Gentoo Linux
Web Browser: Firefox 1.0.8
Categories: Version control

-- GeorgeClark - 22 May 2006

Answer

ALERT! 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:

  1. Create the new topic, pasting in what you want from slashcode
  2. 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
  3. 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.

  1. 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.
  2. I edited the story and saved it to create a new rev. and it was unfortunately dated to today's date.
  3. 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

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2006-05-23 - GeorgeClark
 
  • 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-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.