savannah-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-hackers] Re: CVS on savannah


From: Ian Lance Taylor
Subject: [Savannah-hackers] Re: CVS on savannah
Date: 05 Jan 2004 11:48:07 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Andrew Haley <address@hidden> writes:

>  > Is this done in a way which ensures consistency? Is it safe to access the 
>  > mirror repository while the rsync is in progress? What happens if a 
> checkin 
>  > is in progress on the parent repo while rsyncing the mirror?
> 
> It isn't possible to do this consistently, because CVS commits are not
> atomic.  It is always possible for a developer to check out an
> inconsistent repository.

That description is not precisely correct.  A CVS commit operation
locks all the relevant directories for write access before applying
any changes.  So a CVS commit operation is atomic in a meaningful
sense: it is atomic with respect to other commit operations.

A CVS read operation, on the other hand, locks one directory at a
time.  So when checking out multiple directories, it is possible for a
CVS commit to slip in and modify a set of directories in between
checkouts.

In other words, CVS commits are atomic, but cvs checkouts are not.

You are correct that it is always possible to check out an
inconsistent set of working directories.  That said, using unmodified
rsync can create inconsistencies within a single directory, which is
not possible with CVS.

Ian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]