README_cvs
CVS Code Version System
Simple Survivor's Guide
and
Clear Case Comparison
VS is a Code Versioning System that provides the basics for storing, tracking, retrieving, labeling and branching source code. This document correlates that use of CVS to Clear Case. This "survivors guide" provides the minimum to use CVS and a full listing of capabilities is provided in the cederqvist-1.11.3.pdf
users guide.
------------------------------------
To Build a New Repository:
cvs -d /usr/local/cvsroot init
or
- cvs import -m "Imported Java sources" projects/C4BoardJava jwc start
- cvs import -m "Imported Java sources" projects/C4GameSource jwc start
- cvs import -m "Imported Java sources" projects/gen_html jwc GHTML_0_1
------------------------------------
Checking Out/In Files:
Once the repository is build the first thing you must do is to get your own working copy of the source for. For this, you use the checkout command:
$ cvs checkout [module_name]
This will create a new directory called [module name] and populate it with the source files.
$ cd [module_name]
$ vi [file_name.c]
Once you are completed your changes:
$ cvs commit [file_name.c]
$ cvs commit -m "Added an optimization pass" [file_name.c]
Then release the temperary development files:
$ cvs release -d [module_name]
----------------------------------------
Labeling Your Work:
$ cvs tag -c TAG_NAME backend.c {label and make sure they are checkin}
$ cvs tag -b branch_name {ct mkbrtype -nc x38_jwc_mods &&
$ cvs checkout -r branch_name module_name {checkout relative to/on branch}
$ cvs status -v driver.c backend.c {ct lshistory}
--
$ cvs add filename {ct mkelem -ci file}
- Use "cvs remove filename" to tell cvs that you really want to delete the file.
Use "cvs commit filename" to actually perform the re
- moval of the file from the repository. {ct rmname leaves old revisions of the file! so they can be retrieved}
--
The normal way to move a file is to copy old to new, and then issue the normal cvs
commands to remove old from the repository, and add new to it.
$LIST
$ mv old new
$ cvs remove old
$ cvs add new
$ cvs commit -m "Renamed old to new" old new
$LIST_END
---------------
$ cvs diff driver.c
-----------------
Merging:
Simple:
$cvs update -j {merge (join)}
A second merge from the same branch:
you need to specify that you only want to merge the changes on the branch
which have not yet been merged into the trunk. To do that you specify two Ô-jÕ options, and cvs merges the changes from the first revision to the second revision.
Best, tag the R1fix branch after every merge into the trunk, and then use that tag for subsequent merges:
$ cvs update -j merged_from_R1fix_to_trunk -j R1fix m.c
------------------
Audit history and logs
$ cvs history
$ cvs log
Keywords
$Id$
$Date$
-------------------------------------------
:::::::::::::::::::::::::::::::::::::::::::
To Build a New Repository:
cvs -d /usr/local/cvsroot init
or
cvs import -m "Imported Java sources" projects/C4BoardJava jwc start
cvs import -m "Imported Java sources" projects/C4GameSource jwc start
cvs import -m "Imported Java sources" projects/gen_html jwc GHTML_0_1
|