CVS (Concurrent Versions System) is a tool that enables you to track changes to a set of files over time. CVS is commonly used in software development to allow multiple developers to coordinate changes, track versions, and permit simultaneous development of different versions of the same code.

This book is not just for software developers. It is for anyone who produces things that change. CVS can manage versions of anything that can be stored in files, so it is useful for programmers, system administrators, software architects, writers, graphic artists, and user-interface (UI) specialists. Outside the computing field, it can be used by authors, poets, managers, architects, engineers, accountants, and people running their everyday lives.

Contents

Structure of the Book

This book can be read out of sequence, so you can learn about any aspect of CVS at the time you need it. However, the concepts are presented in a logical order, and they might be more easily understood if you read the chapters in order. The book is organized into five parts.

Part I explains the basic concepts of CVS and includes a quickstart guide. If you don't already know CVS, read the quickstart guide before going on to the rest of the book. Part I includes the following chapters:

This chapter explains the everyday CVS commands and concepts, the ones that almost everyone who uses CVS will need. Each command is accompanied by an example and a description of the most commonly used options to the command.

Commands in this chapter include add, remove, commit, and update. Concepts covered include the CVS repository and sandboxes, conflicts and merges, using CVS with binary files, and switching repositories.

Tagging, branching, and merging branches back to the trunk are closely related topics. This chapter explains tagging and branching, including why and when to tag or branch your project, tagging before releases, and using branching to create a bugfix version of a project.

This chapter explains the systems used in CVS to permit multiple developers to work on the same project without loss of data. For example, it discusses the commands available for displaying changes to files.

Part III is for project managers and repository administrators. The chapters can be read in any order, but later chapters assume familiarity with commands explained in earlier chapters. Part III includes the following chapters:

This chapter discusses repository management and the modules in the repository. It covers creating a repository and estimating disk space, the structure of the CVS repository, configuration and permissions, repository security, and hand-editing a repository.

This chapter covers the tools used by project administrators. Topics include importing and exporting projects, using the cvs admin command, reading the output of the logging commands, and using the info configuration files to interact with bug-tracking systems or to enforce log-message formats.

This appendix discusses third-party CVS clients for Windows, Unix, GNU/Linux, and Macintosh operating systems. It also discusses the tools that integrate CVS with programmers' integrated development environments (IDEs).

Because CVS is a useful open source tool, people have written third-party tools for it. This appendix explains some of the useful third-party tools available for CVS.

In addition to the five parts just described, this book also contains a CVS Quick Reference section for when you just need a quick reminder of command syntax.

Conventions Used in This Book

The following typographical conventions are used in this book:

Italic

Used for CVS commands and their options, CVS configuration file keywords, filenames and directory names, for emphasis, and for the first use of technical terms.

Constant width

Used in code examples and to show the contents of files.

Constant width italic

Used in syntax descriptions to indicate user-defined items.

Constant width bold

Used for user input in examples that show both input and output.

[ ]

Square brackets enclose optional elements in syntax diagrams.

{ }

Braces enclose lists of elements from which you are required to make one choice.

|

Vertical bars separate elements in lists that are enclosed by square brackets ([...]) or braces ({...}).

...

Ellipses are used within syntax diagrams to indicate repetition. Ellipses are also used in code examples to indicate nonessential command output that has been eliminated for the sake of clarity and space.

(tab)

In some syntax diagrams, (tab) is used to indicate a point at which you must type a tab character.

SSH, ssh

We use SSH (uppercase, regular text) as an acronym when referring to the Secure Shell protocol. We use ssh (lowercase, italic text) to refer to the Unix command often used to invoke an SSH program.

Learning More About CVS

In addition to this book, there are a number of other helpful CVS resources that you should know about. CVS has an active user community, and additional resources may become available over time.

Web Site and Manpages

The CVS home page is at http://www.cvshome.org/. This site provides a copy of the info cvs manual by Per Cederqvist et al, a CVS FAQ, and links to most of the available third-party tools for CVS.

On Unix and Linux systems, the man cvs and info cvs commands provide documentation for the server and the command-line client.

Related Books

The CVS Pocket Reference by Gregor N. Purdy is a useful take-anywhere book published by O'Reilly & Associates, Inc.

Applying RCS and SCCS by Don Bolinger and Tan Bronson explains RCS, the tool CVS calls to manage individual files within its database. It is also published by O'Reilly.

Open Source Development with CVS by Moshe Bar and Karl Franz Fogel contains a guide to CVS and a guide to open source project management. The print version is published by Paraglyph Press, and sections of the book are available online at http://cvsbook.red-bean.com/.

Version Management with CVS by Per Cederqvist et al is published online at http://www.cvshome.org/docs/manual/ and is also available as info cvs. The print edition is published by Network Theory Ltd.

Linux Server Hacks by Rob Flickenger is published by O'Reilly & Associates, Inc. and contains 11 hacks for using CVS as a system administrator.

Acknowledgments

No book is written in isolation, and I have had a lot of help with this one. My family and friends have been very encouraging and helpful, and the women and men of LinuxChix were there to keep me going when things were hard. Thank you all!

I would like to thank Chris Klint and David North for the donation of a laptop and a laptop hard drive when I had to travel while preparing the book. Thanks to Sonja Krause-Harder and Rebecca Walter Pedersen for SuSE information, Alan Cox and Telsa Gwynne for Red Hat information, and Akkana Peck for Red Hat testing. Thanks also go to Mia Ridge for Macintosh information and Michelle Peglar for the use of a Macintosh.

I am grateful to my editor, Jonathan Gennick. I thought I was a pretty good writer when I started, but I'm a much, much better writer now. Thank you, Jonathan.

Thank you to Derek Price for technical review. Your comments have ensured that the book is accurate and that it reflects the recommendations of the CVS developers.

Many thanks to Ellie Volckhausen, Betsy Waliszewski, Bonnie Sheehan, and all the others at O'Reilly & Associates who have worked hard to make this book happen.

To Dr Anne Small and her team of dedicated medical professionals and support staff — thank you. Without you, I would be an invalid, not an author, and I am eternally grateful.

I want to thank my dear friends Mike Whitaker and Richard Gencks for general encouragement and emotional support, especially when my wonderful grandmother died while I was reviewing the book. (I love you, Nan.)

And to my husband, Dancer Vesperman, and our housemate and friend Karen Hall — thank you. There is no way I could have done this without you.