[Kerberos for Macintosh] [Applications] [Miscellaneous Documentation]
Confusingly, CVS uses the tag command for version tags and branch tags, although their behavior is significantly different. This is mostly convinient, but sometimes confusing, and may take some getting used to.
The tag command manipulates version tags and branch tags. You can use the command to create new tags and delete old tags, but you should be absolutely certain that you know what you are doing before you delete a tag. Deleting a tag removes information that is extremely diffucult, if not impossible, to recover later.
It is a good idea to always use the -c option with tag, to make sure that you don't accidentally tag a wrong version of a file.
Tag with tag
cvs tag -c SillyBalls_1_0a1
Start a new branch with tag
cvs tag -c -b SillyBalls_1_1_Exp cvs update -r SillyBalls_1_1_Exp
It is important that you run update when you are starting a new branch, because otherwise files that you add after creating the branch will be added on the trunk, not on your branch.
Examples for merging changes between branches are among update examples.
The import command is to import sources into the repository, for creating new projects or tracking third-party sources.
You can use the -I option to ignore some files. By default, CVS will ignore all files specified in CVSROOT/cvsignore. When using import, you probably don't want to ignore any files, so you should use -I ! to specify no files should be ignored:
cvs import -m "Import from sources" -I ! "mit/appl/MacMoira"
If there are files you want to ignore, you can specify their filenames with the -I option. To ignore no files except for IgnoreMe.c:
cvs import -m "Import from sources" -I ! -I IgnoreMe.c
"mit/appl/MacMoira" meeroh start
In -I filename specifications, ? matches any signle character and * matches any (possibly empty) character string.
The -W option is most commonly used in import to specify that some files should be treated as binary. By default, files specified in CVSROOT/cvswrappers with -k 'b' option will be treated as binary. If you want to specify additional binary files, you need to use -W inside import. For example, to treat all .o and .gif files as binary:
cvs import -m "Import from sources" -I ! -W "*.o -k 'b'" -W
"*.gif -k 'b'" mit/appl/MacMoira meeroh start
In this example, -I ! is used because CVS defaults to ignoring .o files. Like with -I, ? and * match any single character and any string, respectively.
When tracking third party sources, you must use always use the same vendor tag and a different release tag for a particular set of sources. Importing Internet Config 1.1 sources to "third/Internet Config" with Internet_Config vendor tag and Internet_Config_1_1 release tag would be done like this:
cvs import -m "Imported from 1.1 sources" "third/Internet
Config" Internet_Config Internet_Config_1_1
Later, you might want to import Internet Config 2.0 sources:
cvs import -m "Imported from 2.0 sources" "third/Internet
COnfig" Internet_Config Internet_Config_2_0
If import reports any conflicts, modifications have been made to sources since the previous import, and you will have to merge those changes into the newly imported sources:
cvs update -j Internet_Config_2_0
It's important to notice that the import commands should be run on the new sources, but the update command should be run on your working files. After you resolve the possible conflicts, you can commit the merged sources.
Import can be used to start a new project. In this case, the vendor and release tags are not important. It's common to use "start" as the release tag and your username as the vendor tag. For example, importing MacMoira sources into mit/applt/MacMoira:
cvs import -m "Importing from CodeWarrior Pro 1 sources"
mit/appl/MacMoira meeroh start
Questions or comments? Send mail to firstname.lastname@example.org
Last updated on $Date: 2003/11/18 21:58:42 $
Last modified by $Author: smcguire $