Bug: Some files in the distribution have mixed CR/CRLF formats
The following is also true of TWiki20041030beta.
It seems to me that some of the files being shipped with TWiki are messed up. I found a couple others like this, too (
WebTopicList, to name one). I think all the
RCS ,v files were created using LF only copies, but then the CRLF ones somehow sneaked into the .txt versions. So you edit it and check it in and
RCS flips out because all those CRs changed where the lines are in it's delta calculations. Eventually it just bombs out.
See note in
RCSDiffNotWorkingBetweenRevisions
Test case
Short method: download the distribution and open up the file Main\WebHome.txt in a text editor. Notice that there is a LF after the first META line. Later there are CRLFs. This is what messes up rcsdiff later, since there were never any CRLFs in the file when it was checked in. Just open
WebHome.txt,v and look for any CRLFs. There are none.
Long method: Get TWiki set up on a Windows XP machine using
ActiveState Perl, IIS, and native ports of
RCS and grep (haha - no, really). Then go into the
Main and and check that you can do diffs between revisions. Then edit the page, save and try to do a diff again.
Easiest solution is to just run dos2unix on all these files.
Environment
--
JasonPierce - 13 Apr 2005
Impact and Available Solutions
Follow up
I ran into the same issue trying to setup
TWikiRelease02Sep2004 on two different windows boxes (Win 2003 and Win XP) following the
WindowsModPerlInstallCookbook by the book.
This is a very tricky issue because :
- rcsdiff will not necessarily bomb out.
- you could edit a topic once and not notice the pb as it's mostly visible in diffs.
- even diff may (visually) show evidence of the pb only after a few edits.
Unlike Jason, I face the pb with about all the topics (in the distro) I could test. My old topics seem to behave fine as well as new ones.
Using
DOS2UNIX does NOT fix the pb for me.
I would really appreciate a solution to fix my distro topics.
Anobody's got an idea ?
--
JeromeBouvattier - 14 Sep 2005
Ignore my previous comment. The problems I faced are due to a mix of other issues with
RCS. (
RCSWrapCorruptsMyTopicsHistory,
StrangeEOLsForMyOldTwiki)
--
JeromeBouvattier - 15 Sep 2005
Fix record
Discussion