Tags:
create new tag
view all tags
Using RcsLite? and RcsFile? from CVS (to fix the problem with replacing revisions) still has one small problem

Basically if the $doKeepRevIfEditLock option is set, then a new topic is created and edited within the hour, then the date which gets stored in the rcs file is the epoch secs number rather than the date.

This then breaks the diff function and all the other revision stuff

I have uploaded an example file, and I will have another poke in the code, but if someone who knows the code better could have a look this would be great.

-- EdWildgoose - 04 Aug 2003

I can't quite see what is breaking here, but I think my example rcs file may not be completely representative. What may be happening is that either something is going wrong with the delete revision code, or there is some wierd interaction with the delete revision code and the addRevision stuff.

I have uploaded another small rcs file example and this one was created by typing "abc", then hit edit again "def", then hit edit again "ghi", then I changed the $doKeepRevIfEditLock var to "0" and did another edit.

Certainly there seems to be a problem with the revRep stuff in rcsLite when using it on the very first revision in the file.

A workaround (a bit ugly) is to disable this stuff for the very first revision, eg in store.pm find the section in saveNew around line 552 which says

            # same user?
            if( ( $TWiki::doKeepRevIfEditLock ) && ( $user eq $TWiki::userName ) && $currentRev ) {
                # replace last repository entry
                $saveCmd = "repRev";

and change the middle line to:

            if( ( $TWiki::doKeepRevIfEditLock ) && ( $user eq $TWiki::userName ) && ($currentRev>1.1) ) {

After some basic testing this appears to work ok and simply means that the initial save becomes it's own revision and replacements tick up only from 1.2 onwards. Does this look OK as a workaround for now?

Any suggestions on how to fix properly appreciated

-- EdWildgoose - 05 Aug 2003

I'll look into this.

-- JohnTalintyre - 06 Aug 2003

Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt TestTopic1.txtv.txt r1 manage 0.3 K 2003-08-04 - 09:22 UnknownUser Example of corrupted rcs file
Unknown file formattxtv TestTopic4.txtv r1 manage 0.5 K 2003-08-05 - 09:01 UnknownUser Another corrupt rcs file created with rcsLite
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2003-08-06 - JohnTalintyre
 
  • 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.