Tags:
create new tag
view all tags
Question

Strange one this, and hopefully the last as everything else works. When I click on the <_ buttons the only diffs that work are those between the initial version and the first revision. Subsequent diffs fail for an unknown reason. Anyone seen this problem before?

  • TWiki version: December 2000
  • Web server: Apache
  • Server OS: NT4 Sp6a

-- MartinCleaver - 27 Feb 2001

Answer

It looks like rcsdiff is not working properly. Make sure that the path is set correctly. Also check if rcsdiff works on the shell level, i.e.

rcsdiff -q -w -B -r1.1 -r1.4 WebHome.txt

-- PeterThoeny - 06 Mar 2001

Further User Note

I got this problem on a fresh Solaris 8 box using RCS 5.7.

To fix it I installed the Gnu Diffutils package version 2.7 (from the Solaris site http://www.sunfreeware.com/ or from the source at http://www.gnu.org/software/diffutils/diffutils.html ).

As far as I can tell the version of RCS requires the Gnu Diffutils to function correctly, otherwise you get exactly the error you saw. Running rcsdiff from the shell gives an illegal option error that comes from diff, which was my clue.

-- SimonClift - 15 Mar 2001

Hmm. Interesting because it always works for me from the command line and only in one instance on the web. The one instance is for the 1.1 to 1.2 revision, subsequently it fails!

-- MartinCleaver - 20 Mar 2001

I had the same problem. My solution was to:

  1. install the GNU diffutils
  2. install the GNU RCS tools (using the configure option --with-diffutils)
in that order since rcs is dependent on the diffutils. This got me working ok.

-- TaitCyrus - 05 Apr 2001

I had the problem with HP-UX 11.00 PA-RISC, using the prebuilt SD-depots of GNU diffutils 2.7 and RCS-5.7 from the HP-UX porting center. I'd like to note that that version of rcsdiff has the standard /usr/bin/diff hard-coded into the binary, so even putting the path to the GNU /usr/local/bin/diff before /usr/bin didn't help!

Because I didn't want to quick-fix with symlinks, I compiled the sources with ./configure --with-diffutils and ensured that DIFF=/usr/local/bin/diff. Works fine!

Note to the TWiki maintainers: It took me quite some time to become aware of this problem, because the testenv script did not complain (quote: diff: GNU diff was found on the PATH - this is the recommended diff tool). Maybe you could improve the script to actually try an rcsdiff and check for the outcome. It seems that this issue affects a lot of non-Linux Unix systems where GNU diff is not the standard tool.

-- IngoKarkat - 22 Sep 2003

Thanks for the info - if you could update TWikiOnHPUX with your comment that would be useful. An HP-UX cookbook might be handy...

ImproveTestenv has this suggestion already, I think, but patches are always welcome of course. May be more useful to do a strings command on the rcsdiff binary and check that the file at the diff path is the right version, as the testenv script really needs to check the diff version to ensure that binary attachments work.

-- RichardDonkin - 22 Sep 2003

Had same problem on Solaris 8, using GNU diff 2.7 and rcs 5.7 with the latest beta twiki. It also has rcsdiff in Twiki.cfg with the -B option. GNU rcsdiff 5.7 (at least ours) does not know -B. WHat is it? Now I'm a bit worried, that others (ci, co etc) use options they don't have or worse, same name, but different effect. Although it now seems to work after I removed the -B. WOuld an error like this also cause the files to not be unlocked, after I did a save changes? It seems people always get the edit warning, that it might be locked by user B, even if user B has saved long ago.

# /opt/PERrcs/bin/diff -v
diff - GNU diffutils version 2.7
# /opt/PERrcs/bin/rcsdiff -V
RCS version 5.7
# /opt/PERrcs/bin/rcsdiff -h
rcsdiff: no input file
rcsdiff usage: rcsdiff -ksubst -q -rrev1 [-rrev2] -Vn -xsuff -zzone [diff options] file ...
rcsdiff aborted

NOTE: -B is not an rcsdiff option, but a diff option. rcsdiff can pass-through options to diff, but according to the rcsdiff usage line, these have to be at the end before the file spec?

Solution: Whoever compiled the package at ours didn't pay attention and it accidentally compiled soalris diff into rcsdiff frown ANyway .. works now, sorry for the rumble smile

-- PhilippeSteindl - 17 Feb 2004

I just ran into a very similar problem. I got everything working on Windows XP with TWiki 20040902. Sandbox was working great. I could edit, create, etc. Diffs worked fine.

Then I went to edit the Main/WebHome topic. I made my change and saved. It showed as a new revision and I saw the page with my changes. However, it then broke diffs for that topic. You couldn't even diff between two of the stock versions of WebHome. You'd get this, even from the shell:

rcsdiff -x,v -q -w -B -r1.19 -r1.20 -ko --unified=3 "C:/TWiki/data/Main/WebHome.txt,v"
co: C:/TWiki/data/Main/WebHome.txt,v:172: edit script refers to line past end of file
co aborted
rcsdiff: co.exe failed for unknown reason
rcsdiff aborted

I tried some of the other files in Main and didn't get the same problem. I then opened WebHome in notepad and noticed something strange. There appeared to be a mix of both LF only and CRLFs. I grabbed the stock WebHome.txt and found that this was true even there.

I opened the file up in UltraEdit and converted all the CRLFs to plain LFs and resaved it. After that, I could edit via the web without any problems.

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 its delta calculations. Eventually it just bombs out.

Actually, this seems important enough to make a special note for. See CorruptedTxtFilesInDistribution

-- JasonPierce - 13 Apr 2005

Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r11 - 2005-04-16 - JasonPierce
 
  • 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.