CVS (Concurrency Version System) is a version control system, which allows the developer to keep old versions of files (usually source code); keep a log of who, when, and why changes occurred; compare the differences between versions; and reconstruct old versions. CVS also helps to manage releases and to control the concurrent editing of source files among multiple authors.
Unlike simpler systems such as RCS, CVS does not just operate on one file at a time or one directory at a time, but operates on hierarchical collections of directories consisting of version controlled files.
CVS is great as part of a disaster plan to allow a development team to recover from a major blunder or error.
man cvs
http://www.lns.cornell.edu/public/COMP/info/cvs_tutorial/cvs_tutorial.html
Local Bucknell copy of Tutorial [Downloaded November 16, 2004]
1. Create a directory where you want your team's central repository. I suggest that the name be "Master" and I refer to this name below.
2. Set permissions of directory Master so that all developers can read and write into it.
3. Developer does the following Unix commands:
setenv CVSROOT full-path/Master setenv CVSEDITOR emacswhere full-path is the full path name of Master directory.
I suggest you put them in your .cshrc file.
4. Initialize CVS once by doing the following Unix command:
cvs init
Note the space after cvs. Some tutorials do not have this space.
This places directory CVSROOT which contains some start up
files in the Master directory.
5. If your team has some existing files you want to put in the CVS Repository, move them to a working project directory, e.g., Project2 (This directory should NOT be under Master directory but in a place where the team will work!). Clean up the directory and any sub-directories, i.e., remove all files you don't want in repository, e.g., remove .o, or .class files. Now to import the files into the CVS Repository, do the following cvs command in the working project directory, i.e., Project2:
cvs import -m "Project2 Whiteboard" Project2 CS475-tag start
where -m is for log message, Project2 is the "module-name", CS475-tag is the "vendor-tag" and start is the "release-tag."
If your team has no existing files, still do the same cvs import command within an empty Project2 directory (This directory should NOT be under Master directory but in a place where the team will work!). This creates the Project2 module in the repository.
1. Developers do the following Unix commands:
setenv CVSROOT full-path/Master setenv CVSEDITOR emacswhere full-path is the full path name of Master directory.
I suggest you put them in each developer's .cshrc file.
2. In their own working area, developers create a new directory with the agreed upon project name, e.g., directory Project2.
3. Developers (including the person who did the cvs import command above) move into their own working directory in the parent directory of the Project2 directory and check out the module Project2 by typing:
cvs checkout Project2
and the current files, any sub-directories and files in sub-directories of the repository will be placed in their directory. They may edit the files without worry of interference from others.
Note this command is done in teh parent directory of Project2.
CVS may find a conflict with what is currently in Project2 directory and what is in the repository. If a conflict, cvs states "to move away the file" and places a "C" on the conflicting file. It is best to rename the old file and do the checkout again. Now it is the responsibility of the developer to check both files and resolve the conflict manually, possibly in consultation with other developers.
Developer may use "co" as shorten form of "checkout".
4. When developers want others on project to use their files or to check them in for save keeping, they do the following in the Project2 directory:
cvs commit filename
CVS will open an emacs window where you type in information to log your changes. Type in text that explains to the other developers what you did to each file. Save the emacs buffer and exit emacs. Now CVS creates a new version for the file.
5. If developer wants to enroll a new file to Project2, type the following in the working Project2 directory
cvs add filename
and it will be added to the repository the next time the developer types cvs commit filename.
6. If a developer wants to update his or her working copy of Project2, he or she moves to his or her working directory Project2 and types
cvs update
CVS will merge what is currently in the repository with your code. If a conflict, cvs states "to move away the file" and places a "C" on the conflicting file. It is best to rename the old file and do the update again. Now it is the responsibility of the developer to check both files and resolve the conflict manually, possibly in consultation with other developers.
7. Also, read about the following CVS commands:
cvs -H - help cvs history - displays past cvs commands on the repositroy cvs status - displays status of files cvs log - displays log info on files cvs remove filename cvs diff versions-to-check-for-differences
There are other commands, many options and features not explained here.
http://www.cvshome.org/