[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to lock a file and don't allow multiple people to modify it at t
Re: How to lock a file and don't allow multiple people to modify it at the same time.
Fri, 24 May 2002 04:21:06 -0700 (PDT)
--- Rabbit Xu <address@hidden> wrote:
> Hello all:
> Becase I don't allow multiple people to modify at
> the same time. I want
> to lock a file when anyone checkout this file and
> want to modify it.
> How to do?
If you can get away with using advisory locks (and,
barring non-technical factors like fear, I haven't
seen a situation where you can't), you might want to
take a look at the advisory locks patch at SourceForge
under the project RCVS.
This patch adds the "-c" option to "cvs edit" and "cvs
ci" so that the edit will abort if other edits exist
and the checkin will abort if no valid edit exists.
Two caveats, though, the feature is most useful if
everyone does "cvs edit -c" (ie have everyone put
"edit -c" in their ~/.cvsrc files) and, users can
still override the
checks by using "cvs edit -f" and "cvs ci -f" (after
all, we don't want to break the concurrency in CVS).
So, my question is, "Why do you think you need
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience