Contents / Previous / Next


CVS Concepts

The Repository

The CVS "repository" stores a complete copy of all the files and directories which are under version control.

Normally, you never access any of the files in the repository directly. Instead, you use CVS commands to get your own copy of the files into a "working directory", and then work on that copy.

When you have finished a set of changes, you check (or "commit") them back into the repository.

The repository is not a subdirectory of the working directory, or vice versa; they should be in separate locations.

The repository is split in two parts. `$CVSROOT/CVSROOT' contains administrative files for CVS. The other directories contain the actual user-defined modules.


File States

Based on what operations you and others have performed on a checked out file, it has a certain state, reported by the `status' command:

Up-to-date: The file is identical with the latest revision in the repository for the branch in use.

Locally Modified: You have edited the file, and not yet committed your changes.

Locally Added: You have added the file with `add', and not yet committed your changes.

Locally Removed: You have removed the file with `remove', and not yet committed your changes.

Needs Checkout: Someone else has committed a newer revision to the repository. The name is slightly misleading; you will ordinarily use `update' rather than `checkout' to get that newer revision.

Needs Patch: Like Needs Checkout, but the CVS server will send a patch rather than the entire file. Sending a patch or sending an entire file accomplishes the same thing.

Needs Merge: Someone else has committed a newer revision to the repository, and you have also made modifications to the file.

File had conflicts on merge: This is like Locally Modified, except that a previous `update' command gave a conflict. If you have not already done so, you need to resolve the conflict.

Unknown: CVS doesn't know anything about this file. For example, you have created a new file and have not run `add'.


Versions, Revisions and Releases

A file can have several versions, they are called "revisions".

Likewise, a software product can have several versions, given a version number such as `4.1.1'. They are called "releases".


Revision

CVS assigns revision numbers such as `1.1', `1.2', etc.
Each version of a file has a unique "revision number".
It is also possible to end up with numbers containing more than one period, for example `1.3.2.2'.


Sticky Tags

Sometimes a working copy's revision has extra data associated with it. The most common use of sticky tags is to identify which branch one is working on. The sticky tags will remain on your working files until you delete them with:
 cvs update -A