CVS: Using CVS
Introduction
CVS, an acronym for Concurrent Versions System, is free software (GPL license) for version management, successor to SCCS. Although it is still widely used in the open source software domain, it is now obsolete with the arrival of its successor Subversion. Since it helps sources converge towards the same destination, we say that CVS manages concurrent versions. It can function both in command line mode and through a graphical interface. It consists of client modules and one or more server modules for exchange areas.
It’s worth noting that there are also decentralized software options like Bazaar, Darcs, Git, or Monotone, all under Open Source licenses.
Among the most popular graphical interfaces, notable ones include Cervisia for Linux and TortoiseCVS for Windows.
Prerequisites
For prerequisites, you need a few things in your environment. I strongly recommend adding them to your shell load file (e.g., ~/.bashrc, ~/.zshrc):
export CVS_RSH=/usr/bin/ssh
export CVSROOT=:ext:xxx@mycompany.com:/var/lib/cvs
In the first line, we need to indicate the transport method for CVS. In this case, it’s SSH. For the second, we indicate the hostname where the CVS server is located, as well as the folder where the repository is located.
Reload your shell and you’re good to go.
Usage
Projects
- Downloading a project:
cvs checkout project_name
- Updating a project after updates (this does not upload our updates):
cvs update
- Creating a new project (make sure you’re in the concerned project first!):
cvs import project_name creator release
- Destroying a project:
cvs release -d project_name
Adding Files
- Adding files:
cvs add file_name
- Updating files:
cvs commit files_to_update
- Updating files with comments at the same time:
cvs commit -m "My comments" files_to_update
Removing Files
To remove files, you need to:
- Delete the file on your local machine:
rm file_name
- Remove the file from cvs:
cvs remove file_name
- Commit the changes:
cvs commit file_name
Identification
- View differences between server modifications and your own:
cvs diff
Last updated 20 May 2007, 20:37 CEST.