<div id="Concurrency"></div>
<div class="header">
<p>
Next: [[cvs: Mechanisms to track who is editing files#Mechanisms to track who is editing files|Watches]], Previous: [[cvs: Informing others about commits#Informing others about commits|Informing others]], Up: [[cvs: Multiple developers#Multiple developers|Multiple developers]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="Several-developers-simultaneously-attempting-to-run-CVS"></div>
=== Several developers simultaneously attempting to run CVS ===

<div id="index-Locks_002c-cvs_002c-introduction"></div>
If several developers try to run <small>CVS</small> at the same
time, one may get the following message:

<div class="example" style="margin-left: 3.2em">
 <nowiki>[</nowiki>11:43:23<nowiki>]</nowiki> waiting for bach's lock in /usr/local/cvsroot/foo
</div>

<div id="index-_0023cvs_002erfl_002c-removing"></div>
<div id="index-_0023cvs_002ewfl_002c-removing"></div>
<div id="index-_0023cvs_002elock_002c-removing"></div>
<small>CVS</small> 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&rsquo;t running a cvs
command, look in the repository directory mentioned in
the message and remove files which they own whose names
start with &lsquo;<tt>#cvs.rfl</tt>&rsquo;,
&lsquo;<tt>#cvs.wfl</tt>&rsquo;, or &lsquo;<tt>#cvs.lock</tt>&rsquo;.

Note that these locks are to protect <small>CVS</small>&rsquo;s
internal data structures and have no relationship to
the word <em>lock</em> in the sense used by
<small>RCS</small>&mdash;which refers to reserved checkouts
(see [[cvs: Multiple developers#Multiple developers|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.

<div id="index-Atomic-transactions_002c-lack-of"></div>
<div id="index-Transactions_002c-atomic_002c-lack-of"></div>
One might hope for the following property:

<blockquote>
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.
</blockquote>

but <small>CVS</small> does ''not'' have this property.  For
example, given the files

<div class="example" style="margin-left: 3.2em">
 a/one.c
 a/two.c
 b/three.c
 b/four.c
</div>

if someone runs

<div class="example" style="margin-left: 3.2em">
 cvs ci a/two.c b/three.c
</div>

and someone else runs <code>cvs update</code> at the same
time, the person running <code>update</code> might get only
the change to &lsquo;<tt>b/three.c</tt>&rsquo; and not the change to
&lsquo;<tt>a/two.c</tt>&rsquo;.


----

<div class="header">
<p>
Next: [[cvs: Mechanisms to track who is editing files#Mechanisms to track who is editing files|Watches]], Previous: [[cvs: Informing others about commits#Informing others about commits|Informing others]], Up: [[cvs: Multiple developers#Multiple developers|Multiple developers]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>
This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
