Occasionally something will go wrong with RCS, t is designed so you are safe from losing a file, however. Most problems result from not having locked a file or from working on a file that somebody else has locked. If this happens, you should see the section on "Changing attributes."
It is safe to interrupt (use ^C) an RCS operation. It prints a message
about RCS cleaning up and restores the file it was working on.
Occasionally, though, some catastrophe such as the file system filling up
or a file server going down is handled less than gracefully. When this
happens, you should use rlog to see what state the file was left
in. It may still need to be checked in or out. Liberal use of
rcsdiff to compare the working version of the file with the RCS
version may verify which version you want checked in.
Occasionally, you'll get the message:
demo% co test.c co error: RCS file RCS/test.c,v is in use demo%
this means either somebody else is using RCS to access `test.c'
in which case you should be able to try again in a few seconds or a
catastrophe (see above) has occurred and RCS left a semaphore file
around. The name of the semaphore file will be `RCS/,filename,'
where the , is prepended and appended to the name of the working
file. If this file exists and is more than a few seconds old, it can be
safely removed.
If you have locked a file and not made any changes, but attempt to check
it back in but using the -u flag to have it checked out unlocked
immediatly after, the file will not be unlocked. The following
illustrates this.
demo% co -l test.c RCS/test.c,v --> test.c revision 1.3 (locked) done demo% ci -u test.c RCS/test.c,v <-- test.c new revision: 1.4; previous revision: 1.3 File test.c is unchanged with respect to revision 1.3 checkin anyway? [ny](n): n checkin aborted; test.c not deleted. demo% rlog -h test.c RCS file: RCS/test.c,v; Working file: test.c head: 1.3 locks: pete: 1.3; strict access list: symbolic names: V3: 1.3; V1: 1.1; comment leader: " * " total revisions: 3; ======================================================== demo%
Notice that the state is still locked. The best thing to do in this case
is to unlock the file using the rcs command an then to check it
out unlocked.
demo% rcs -u test.c RCS file: RCS/test.c,v 1.3 unlocked done demo% co test.c RCS/test.c,v --> test.c revision 1.3 writable test.c exists; overwrite? [ny](n): y done
Go to the first, previous, next, last section, table of contents.