[Top][All Lists]

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

Re: CVS Transaction

From: Todd Denniston
Subject: Re: CVS Transaction
Date: Thu, 08 Sep 2005 10:03:08 -0500

"Mark D. Baushke" wrote:
> Andy Jones <address@hidden> writes:
> > There is also the theoretical issue of multiple developers committing
> > changes to the same set of multiple files at once, which does rather
> > worry me.
> It should not worry you. cvs gets it correct. Read the manual on
> how cvs does locking.
> > In an ideal world, one of those developers should get all his files
> > committed, and the others should be locked out.  But without
> > transactional commits, you can't guarantee that.
> You are mistaken. Transactional commits are not required. All that is
> required is to do locking of the resources that will change and have
> anyone else in contention back-off and try to acquire locks again.
> > Of course, the chances of this causing a problem in a genuine
> > development environment, are a completely seperate question...
> I suggest that you need to go and read up on how cvs does directory
> locking to ensure that all of the files for a given commit will block
> someone else from being allowed to do a commit in the same directory at
> the same time.

After reading "CVS locks in the repository" [1] I think it might be good to
perhaps reconsider what you are saying or how you are saying it.

from the manual [1]
"Note that each lock (write lock or read lock) only locks a single directory
in the repository ... To lock an entire tree, you need to lock each

I have not read the code (enough to understand the current question), but my
quick look through the manual[2] does not indicate that `cvs commit` takes
out the #cvs.lock in all the directories in the whole tree at one time, or
even the whole sub tree within the directory the commit is taking place in
at one time. 
If the code does take #cvs.lock, in either the whole tree at one time or the
whole sub tree within the directory the commit is taking place in at one
time, then Andy's fears are a bit larger than needed, but if not then he
definitely has a point.

If someone looks at the code enough to clarify the above point, I recommend
expanding the manual section "CVS locks in the repository" [1] (and the dev
branch version) to include statements indicating how much of the repository
tree is locked on commit, and it might be good to also indicate locking
levels for tagging and importing (i.e. repository write access locking



Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane) 
Harnessing the Power of Technology for the Warfighter

reply via email to

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