Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!wugate!uunet!mcsun!ukc!edcastle!hwcs!zen!vic From: vic@zen.co.uk (Victor Gavin) Newsgroups: comp.sys.hp Subject: Re: Bugs in RCS ?? Message-ID: <2001@zen.co.uk> Date: 25 Oct 89 16:26:52 GMT Organization: Zengrange Limited, Leeds, England Lines: 106 > In reply to my article, Mark Runyan (runyan@hpir.hp.com) wrote >> In a previous article I wrote >>1) If you have a central RCS directory somewhere, which has many links >>to it, and you check a file out as locked in one of the directories >>with a link, you can also check it out as locked in a totally >>different directory, as long as there isn't a copy of the file in the >>second directory. >> >>ie The locking doesn't work, as it is dependent upon having a >>writeable copy of the file in the current directory. > >I'm confused about this. If you check a revision out as "locked", >the lock is stored in the RCS file (The ",v" file). The writeableness >of the working file isn't what sets the lock. But it does inhibit creation of new locked/writeable files. An example is always useful: (2)vic: mkdir RCS (2)vic: touch abc (2)vic: /usr/bin/ci -l abc RCS/abc,v <-- abc initial revision: 1.1 enter description, terminated with ^D or '.': NOTE: This is NOT the log message! >> done (2)vic: ls -al abc -rw------- 1 vic software 0 Oct 25 15:42 abc (2)vic: rm abc (2)vic: grep lock RCS/abc,v locks vic:1.1; strict; [Note: The file is marked as locked within the RCS `,v' file] (2)vic: /usr/bin/co -l abc RCS/abc,v --> abc revision 1.1 (locked) done [but still allows us to check it out again with a lock.] (2)vic: /usr/bin/co -l abc RCS/abc,v --> abc revision 1.1 (locked) writable abc exists; overwrite? [ny](n): n co warning: checkout aborted. [and only if there is a writeable version in the current directory, does it complain.] So what I hope I've proved is that the locking mechanism doesn't actually pay any attention to the file status within the RCS file. >>2) If you have a file checked out as locked, but which hasn't been >>modified, when you check it in it will ask >> >> File blip is unchanged with respect to revision 1.1 >> checkin anyway? [ny](n): >> >>and if you answer `n', the source file will get *deleted*. Worse still >>the lock will still be set so you cannot check out anymore locked >>versions. > >But you can check out the version you already have locked by using >the "-r" option. I'm not sure why the file is deleted or whether >that is the right thing to do or not, but if it is exactly the >same as the revision you already have locked, then you can recover >by checking out the version you have locked by using the "-r" option. Since I said ``no I don't want to check this file in'' I expect the program to behave as if I never asked it to do anything. If I said to you: ``don't check in any files which haven't changed'', you wouldn't interpret that as meaning ``delete all those that haven't changed'', would you ? >If you wish to clear a lock, you can use the "rcs -u" command to >remove a lock that you currently have. You'd prefer it if I make up for the deficiencies in a piece of software by doing the work myself? If there is a problem, it should be fixed. >>As an aside, maybe someone from HP would like to comment on why some >>of the products they ship are much older versions of those available >>from other manufacturers (in this case, RCS from HP is dated May 1983, >>and there are certainly much newer versions available). > >Well, just as an attempt to spread the rumor further, it is because >we haven't obtained a copy of the new stuff that we can resell as >part of product... I think the problem is that later versions of >RCS are under GNU's copyleft and HP lawyers are still completely >sure about what that means if we want to include RCS with HP-UX. This sounds reasonable. Might I suggest that for situations like this HP supply the product (inc. src for GNU stuff) on a seperately contrib tape that is available to anyone for a nominal fee...remember the GNU licence doesn't forbid you from charging a reasonable sum, all they stop you doing is keeping the source to yourself.