RCS (revision control system)

Anything QL Software or Programming Related.
User avatar
RalfR
Aurora
Posts: 872
Joined: Fri Jun 15, 2018 8:58 pm

Re: RCS (revision control system)

Post by RalfR »

I just know "RCS" from Atari to build GUI in separate files.


4E75 7000
User avatar
tofro
Font of All Knowledge
Posts: 2700
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: RCS (revision control system)

Post by tofro »

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.
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
User avatar
ppe
Trump Card
Posts: 171
Joined: Tue Dec 14, 2010 10:48 am
Location: Espoo, Finland

Re: RCS (revision control system)

Post by ppe »

tofro wrote:I don't use rcs (any more - used to use it decades agon on SunOS)
Yeah, I never used RCS, only cvs, svn and git but looks like RCS is the only pony in town for QDOS :(
tofro 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.
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 QDOS :ugeek:


swensont
Forum Moderator
Posts: 252
Joined: Tue Dec 06, 2011 3:30 am
Location: SF Bay Area
Contact:

Re: RCS (revision control system)

Post by swensont »

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.


Silvester
Gold Card
Posts: 436
Joined: Thu Dec 12, 2013 10:14 am
Location: UK

Re: RCS (revision control system)

Post by Silvester »

Here is version dated later to that at http://www.dilwyn.me.uk/c/GNUdiff.zip if its any help.
[file deleted]
Last edited by Silvester on Sat Apr 23, 2022 11:02 pm, edited 1 time in total.


David
User avatar
ppe
Trump Card
Posts: 171
Joined: Tue Dec 14, 2010 10:48 am
Location: Espoo, Finland

Re: RCS (revision control system)

Post by ppe »

Silvester wrote:Here is version dated later to that at http://www.dilwyn.me.uk/c/GNUdiff.zip if its any help.
Thanks Silvester, that's the one I tested and which does not seem to work.


User avatar
XorA
Site Admin
Posts: 1365
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: RCS (revision control system)

Post by XorA »

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.
There should be a — (double minus) before -r options that are a file name. — stops argument processing in getopt.


User avatar
ppe
Trump Card
Posts: 171
Joined: Tue Dec 14, 2010 10:48 am
Location: Espoo, Finland

Re: RCS (revision control system)

Post by ppe »

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

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');
but it seems that for this to work it needs to be:

Code: Select all

system("'diff '-L \"1.2\tdatestring\"' '-L \"filename\tdatestring\" 'tempfile' 'file'");
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!


User avatar
ppe
Trump Card
Posts: 171
Joined: Tue Dec 14, 2010 10:48 am
Location: Espoo, Finland

Re: RCS (revision control system)

Post by ppe »

So.... shall I zip the patched thing up and send it to Dilwyn or shall I push the source to GitHub?


User avatar
dilwyn
Mr QL
Posts: 2761
Joined: Wed Dec 01, 2010 10:39 pm

Re: RCS (revision control system)

Post by dilwyn »

ppe wrote:So.... shall I zip the patched thing up and send it to Dilwyn or shall I push the source to GitHub?
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.

Could go on github too for posterity!


Post Reply