Tags:
create new tag
, view all tags

Bug: Diffs Reverts to 1 - Error

Diffs fails on newly installed system with useRcsDir=1. System tries to compare versions "" and "1.1".

Test case

Install new system with useRcsDir=1. Fix all your RCS dirs per installation docs. Do a diffs on Main.WebHome.

Environment

TWiki version: TWikiRelease01Feb2003
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Mandrake-Linux 9.0
Web server: Apache 1.3.26
Perl version: 5.8.0
Client OS: Mandrake-Linux 9.0
Web Browser: Galeon 1.2.5

-- DavidKing - 24 Aug 2003

Follow up

A fix is to initialize $self{useRcsDir} from $TWiki::useRcsDir rather than from @storeSettings. Do this in RcsFile.pm.

I don't know how to publish fixes yet... smile

-- DavidKing - 24 Aug 2003

Also, I notice that my second revision of this page displayed r1.1 at page bottom. When I clicked Diffs, it showed me "" versus "1.1" which sounds like this bug but may be related to whatever I read about "accumulating changes" before bumping the revision.

I get the RevisionRevertsTo1 error on my system with files known to have many versions. Will look at that next. (Yikes! Where did this RevisionRevertsTo1 topic go? I was just reading it!)

-- DavidKing - 24 Aug 2003

This fix also appears to fix the (disappeared) RevisionRevertsTo1 issue which was caused, in my environment, by a version=1.1 being stuffed into the file's META header. When I edit the file again (with this fix in place), it receives the proper metaheader.

Now if I can only figure out why .htpasswd is not being written... smile

-- DavidKing - 24 Aug 2003

One more comment and I will leave this to the experts.

My previous comment generated a 1.2 revision of this page, maybe because it was made over an hour after my previous previous comment. When I click Diffs or >= at page bottom, the output is baffling. It shows an Added section for 1.2 followed by another Added section with the entire text of 1.1.

Comparing Sandbox on my new installation (which has more than two versions), I see that Diffs shows all diffs and the final entire content of 1.1 is a feature. However, the >= option only shows diffs between most recent versions on files with more than two versions, it does not print the entire content of the older version.

This may be a separate (new) bug, hopefully whoever reviews this will know what to do. smile

-- DavidKing - 24 Aug 2003

This bug just bit me, and I failed (timed out) on the save operations, so I get to type it in again 8-(.

The problem with the revision info and diff is caused by incorrect version metainfo in the saved file. If TWiki doesn't properly locate the RCS ,v file, it will revert to using 1.1 as the revision info. Diff generates diffs from the embedded version info to version 1.1, so it gets screwed up as well.

The fix is to correct the TWiki.cfg file and add useRcsDir to the @storeSettings array.

here is the patch:

Index: lib/TWiki.cfg
===================================================================
RCS file: /twiki/src/cvsroot/twiki/lib/TWiki.cfg,v
retrieving revision 1.12
diff -u -r1.12 TWiki.cfg
--- lib/TWiki.cfg       30 Aug 2003 20:07:22 -0000      1.12
+++ lib/TWiki.cfg       31 Aug 2003 17:58:24 -0000
@@ -295,6 +295,7 @@
     delRevCmd     => "$rcsDir/rcs $rcsArg -q -o%REVISION% %FILENAME% $endRcsCmd",
     unlockCmd     => "$rcsDir/rcs $rcsArg -q -u %FILENAME%  $endRcsCmd",
     lockCmd       => "$rcsDir/rcs $rcsArg -q -l %FILENAME% $endRcsCmd",
+    useRcsDir     => $useRcsDir,
   );
 
 #                   Regex security filter for web name, topic name, user name :

-- JohnRouillard - 31 Aug 2003

JHC. I found this over a year ago and it was never fixed. See: UsingRCSDirectoryResultsInInitalVersionAndBrokenDiff

-- JohnRouillard - 01 Sep 2003

Fix record

Oops, this simple fix should have gotten into TWikiAlphaRelease much sooner. It is now.

-- PeterThoeny - 02 Sep 2003

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2003-09-02 - PeterThoeny
 
  • 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-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.