Tags:
create new tag
, view all tags

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

TWiki version: TWikiRelease02Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Windows XP Pro SP 2
Web server: IIS 5.1
Perl version: ActiveState Perl 5.8 (Perl 5.8.6)
Client OS: Windows XP Pro SP 2
Web Browser: Firefox 1.0.2

-- 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

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2005-09-15 - JeromeBouvattier
 
  • 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.