Quick CVS tutorial
- Set the environment variable CVSROOT
- to Checkout:
- cvs checkout project_name
- cvs checkout -r $(release-name) (e.g. cvs checkout -r latest)
- cvs checkout -r $(release-number) (e.g. cvs checkout -r 3.0.5)
- To checkin a revision:
- cvs commit $(filename) (commits just a single file or list of files)
- cvs commit (commits all files in the corrent dir)
- cvs commit -r $(release-name) (e.g. cvs commit -r latest)
- cvs commit -r $(release-number) (e.g. cvs commit -r 3.0.0)(updates all files to that version)
- cvs commit -m "revision message here"
(If you don't include the -m option, it will open an editor (specificed by $EDITOR) to add the message, so whichever you prefer.)
- To mark a file with a version after you have committed it
- cvs tag $(release-name) $(filename)
- (see above to do so on commit)
- To import a new project into cvs
- cd to the directory where your files are located
- cvs import repository vendortag releasetag
- repository is the relative path to where you want the project in the cvs tree. It will create whatever dir you specify automatically if it does not exist.
- Vendortag and release tag are whatever you want them to be. Mainly just test strings(in double quotes) and don't matter much here.
- check out the files into a different directory and diff them to make sure that there are no differences and then delete or archive the old sources to make sure that you don't accidently edit them in the future instead of those from the cvs tree
- To find the differences between two versions of the project
- cd to the directory where your files are located
- cvs diff
- Shows the differences between the checked out version and the current version
- cvs diff -r $(release-name)
- Shows the differences between the checked out version and the specified version
- cvs diff -r $(release-name) -r $(release-name)
- Shows the differences between the specified versions
- Useful options:
- -r $(release-name)
- -r $(release-number) Either of these can be used do perform an operation on the specified version of the project
cvs --help-commands, cvs --help-options, or cvs command --help will tell you more information about the commands, options, or a specific command. Also, a good help document is located at http://cvshome.org/docs/manual/cvs.html
Send me email if you think I should add something to this page.