Chapter 5. Multiple Users

This chapter explains how CVS can be used for source or content control—how to manage a group of developers working together on a project without having them overwrite each other’s work, causing loss of data. It also describes commands that show what each person has done to a file.

The problem of source control occurs when you don’t have any management software. If you have a central location for data and two people are using the same storage, such as the same file, the second person to save that file will overwrite the first person’s changes. Source control software can prevent this, either by capturing both sets of changes and merging them together, or by preventing two people from having the same file checked out at the same time.

CVS is designed to allow developers to work simultaneously on a file. Several people can work on the same file, each in their own sandbox, and CVS tries to merge their changes to the data in the central repository. If the changes can’t be merged easily, the developer who commits the second set of changes is asked to resolve the conflict. This pattern is explained in Chapter 3.

An alternative to simultaneous development is exclusive development, where one developer at a time has the editing rights for a file. Some development teams prefer to use exclusive development, which is effective for files that can’t be merged. CVS supports the exclusive development of files with a choice of two methods:

  • The first method permits, but does ...

Get Essential CVS, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.