CVS---Concurrent Versions System. Node: Multiple developers

PREVBinary files UPTop NEXTRevision management

Chapter 10: Multiple developers

When more than one person works on a software project things often get complicated. Often, two people try to edit the same file simultaneously. One solution, known as file locking or reserved checkouts, is to allow only one person to edit each file at a time. This is the only solution with some version control systems, including RCS and SCCS. Currently the usual way to get reserved checkouts with CVS is the cvs admin -l command (see admin options). This is not as nicely integrated into CVS as the watch features, described below, but it seems that most people with a need for reserved checkouts find it adequate. It also may be possible to use the watches features described below, together with suitable procedures (not enforced by software), to avoid having two people edit at the same time.

The default model with CVS is known as unreserved checkouts. In this model, developers can edit their own working copy of a file simultaneously. The first person that commits his changes has no automatic way of knowing that another has started to edit it. Others will get an error message when they try to commit the file. They must then use CVS commands to bring their working copy up to date with the repository revision. This process is almost automatic.

CVS also supports mechanisms which facilitate various kinds of communcation, without actually enforcing rules like reserved checkouts do.

The rest of this chapter describes how these various models work, and some of the issues involved in choosing between them.

  • File status A file can be in several states
  • Updating a file Bringing a file up-to-date
  • Conflicts example An informative example
  • Informing others To cooperate you must inform
  • Concurrency Simultaneous repository access
  • Watches Mechanisms to track who is editing files
  • Choosing a model Reserved or unreserved checkouts?
  • PREVBinary files UPTop NEXTRevision management