- publishing free software manuals
Version Management with CVS - the CVS manual
by Per Cederqvist et al.
Paperback (6"x9"), 216 pages, 8 figures
ISBN 0954161718
RRP £19.95 ($29.95)

Get a printed copy>>>

10.5 Several developers simultaneously attempting to run CVS

If several developers try to run CVS at the same time, one may get the following message:

[11:43:23] waiting for bach's lock in

CVS will try again every 30 seconds, and either continue with the operation or print the message again, if it still needs to wait. If a lock seems to stick around for an undue amount of time, find the person holding the lock and ask them about the cvs command they are running. If they aren't running a cvs command, look in the repository directory mentioned in the message and remove files which they own whose names start with ‘#cvs.rfl’, ‘#cvs.wfl’, or ‘#cvs.lock’.(4)

Note that these locks are to protect CVS's internal data structures and have no relationship to the word lock in the sense used by RCS---which refers to reserved checkouts (see section 10 Multiple developers).

Any number of people can be reading from a given repository at a time; only when someone is writing do the locks prevent other people from reading or writing.

One might hope for the following property:

If someone commits some changes in one cvs command, then an update by someone else will either get all the changes, or none of them.

but CVS does not have this property. For example, given the files


if someone runs

$ cvs ci a/two.c b/three.c

and someone else runs cvs update at the same time, the person running update might get only the change to ‘b/three.c’ and not the change to ‘a/two.c’.

ISBN 0954161718Version Management with CVS - the CVS manualSee the print edition