RCS (revision control system)
Re: RCS (revision control system)
I just know "RCS" from Atari to build GUI in separate files.
7000 4E75
Re: RCS (revision control system)
I don't use rcs (any more - used to use it decades agon on SunOS)
This looks more like a sloppy option handling in your version of GNU diff to me than a problem in rcsdiff:
-r actually is a command line option for diff (recurse into subdirectories). But without a space after it, it should be treated by diff as a filename. (Or, if diff really wants to be recursive, it should at least see that none of the files is a directory and -r wouldn't make any sense)
When creating a temporary filename for the checked out version, rcsdiff does in fact use "-r<revision number>" (note no space) as the name (that's normal and done by all rcss). Your specific version of diff doesn't seem to like that.
This looks more like a sloppy option handling in your version of GNU diff to me than a problem in rcsdiff:
-r actually is a command line option for diff (recurse into subdirectories). But without a space after it, it should be treated by diff as a filename. (Or, if diff really wants to be recursive, it should at least see that none of the files is a directory and -r wouldn't make any sense)
When creating a temporary filename for the checked out version, rcsdiff does in fact use "-r<revision number>" (note no space) as the name (that's normal and done by all rcss). Your specific version of diff doesn't seem to like that.
Last edited by tofro on Fri Apr 22, 2022 7:25 pm, edited 1 time in total.
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: RCS (revision control system)
Yeah, I never used RCS, only cvs, svn and git but looks like RCS is the only pony in town for QDOStofro wrote:I don't use rcs (any more - used to use it decades agon on SunOS)

I'm glad we arrived at the same conclusion as to the cause of the problem. I'm using GnuDiff downloaded from Dilwyn's site. Perhaps there at some point was another diff compiled for QDOStofro wrote:When creating a temporary filename for the checked out version, rcsdiff does in fact use "-r<revision number>" (note no space) as the name (that's normal and done by all rcss). Your specific version of diff doesn't seem to like that.

Re: RCS (revision control system)
Looking back at QHJ #28, when I looked at RCS, I reported that 'diff' came with C68. In looking at the current version of C68, I'm not seeing 'diff' on any of the three download files.
I'll look through some old diskettes and see if I have an older version of C68 with diff.
Tim
BTW, all issues of the QL Hackers Journal (QHJ) are available on Dilwyn's website.
I'll look through some old diskettes and see if I have an older version of C68 with diff.
Tim
BTW, all issues of the QL Hackers Journal (QHJ) are available on Dilwyn's website.
Re: RCS (revision control system)
Here is version dated later to that at http://www.dilwyn.me.uk/c/GNUdiff.zip if its any help.
[file deleted]
[file deleted]
Last edited by Silvester on Sat Apr 23, 2022 11:02 pm, edited 1 time in total.
David
Re: RCS (revision control system)
Thanks Silvester, that's the one I tested and which does not seem to work.Silvester wrote:Here is version dated later to that at http://www.dilwyn.me.uk/c/GNUdiff.zip if its any help.
- XorA
- Site Admin
- Posts: 1629
- Joined: Thu Jun 02, 2011 11:31 am
- Location: Shotts, North Lanarkshire, Scotland, UK
Re: RCS (revision control system)
There should be a — (double minus) before -r options that are a file name. — stops argument processing in getopt.tofro wrote:I don't use rcs (any more - used to use it decades agon on SunOS)
This looks more like a sloppy option handling in your version of GNU diff to me than a problem in rcsdiff:
-r actually is a command line option for diff (recurse into subdirectories). But without a space after it, it should be treated by diff as a filename. (Or, if diff really wants to be recursive, it should at least see that none of the files is a directory and -r wouldn't make any sense)
When creating a temporary filename for the checked out version, rcsdiff does in fact use "-r<revision number>" (note no space) as the name (that's normal and done by all rcss). Your specific version of diff doesn't seem to like that.
Re: RCS (revision control system)
Well, I finally did "the right thing" - dug out the source, sprayed some debug lines in there and found out the *actual* source of the problem.
And managed to fix it
Turns out the temporary file name is actually not the problem. The problem is that for some reason, which I won't bother delving into, calling system() on QDOS requires command line arguments to be quoted a bit differently than what is done in the code.
So, original version does this for running the diff when argument to system() call is expanded:
but it seems that for this to work it needs to be:
so the label arguments (-L) that contain spaces and tabs need to be enclosed in double quotes. The original way of doing single quotes around -L and its argument string is not enough.
Thank you for all the comments and feedback!
And managed to fix it

Turns out the temporary file name is actually not the problem. The problem is that for some reason, which I won't bother delving into, calling system() on QDOS requires command line arguments to be quoted a bit differently than what is done in the code.
So, original version does this for running the diff when argument to system() call is expanded:
Code: Select all
system("'diff '-L1.2\tdatestring' '-Lfilename\tdatestring' 'tempfile' 'file');
Code: Select all
system("'diff '-L \"1.2\tdatestring\"' '-L \"filename\tdatestring\" 'tempfile' 'file'");
Thank you for all the comments and feedback!
Re: RCS (revision control system)
So.... shall I zip the patched thing up and send it to Dilwyn or shall I push the source to GitHub?
Re: RCS (revision control system)
I've never used RCS, so send it to me as a zip to replace the one on my site if the current one doesn't work. Plus any amendment needed to the description on the page.ppe wrote:So.... shall I zip the patched thing up and send it to Dilwyn or shall I push the source to GitHub?
Could go on github too for posterity!
--
All things QL - https://dilwyn.theqlforum.com
All things QL - https://dilwyn.theqlforum.com