[cvsnt] Code synchronization

Ezra Epstein eepstein at prajnait.com
Thu Jan 15 19:29:24 GMT 2004


> -----Original Message-----
> Sent: Thursday, January 15, 2004 9:13 AM
> Subject: [cvsnt] Code synchronization
>
> I and another programmer working on WSAD with CVS.
> I have projects checked out into workspace from CVS.
> Another developer checked them out as well without any warnings
> that projects are already checked out by other user.
> How to implement that synchronization in CVS, so two users cannot
> work on the same copy of files.
>
> Eugene.
>

1.  With CVS you should not need such a warning in most cases.  Instead, CVS
handles conflicts at commit -- when changes are committed (checked back in)
to the repository.  There are different situations.
    a.  Users edited different files --> no possible conflict, so no
problem.
    b.  Users edited different parts (lines) of the same file --> also, no
problem This is a (generally) very cool feature of CVS.
    c.  Users edited the same parts (lines) of the same file --> conflict.
CVS will alert you.  How this happens depends on the client tool you are
using.  For regular command-line tools you get a 'C' indicating conflict on
that file....  Then you must fix this.

The point is (c) happens very rarely.

2. You can set up "watches" on files that tell you when things change (not
the same as knowing when something is checked out).

3.  There are ways to lock files in the repository, but that is not normally
how folks use CVS.

4.  It is very much recommended that only authorized developers have access
to cvs.  Sometimes you open up read-only access (e.g., checkout, or ViewCVS,
etc.) to a wider group, but you restrict those that can make changes -- this
is done via techniques that rely on a combination of cvs' mechanism and
OS/filesystem protections.  This might be what you were wanting/missing.
You can limit this by repository, and with some clever admin, also by module
(aka, project).

5.  I've heard of ways of having CVS send alerts on pretty much any activity
(including checkout) but haven't investigated it at all, perhaps that's what
you want...

== Ezra Epstein




More information about the cvsnt mailing list