The date option will select the most recent files with a commit date no later than the date specified as the argument.
Comparing your current working files to the version that was checked out.
cvs diff filename(s)
The first version will compare the specified file(s). If any of the filenames are directories, the cvs will recursively descend through the directory and compare all files.
The second version compares all files in the directory tree rooted at .
commit your changes
cvs commit -m "Comment text goes here." filename(s)
cvs commit filename(s)
Both versions will commit the named files to the repository.
You may use wildcards to specify multuiple files.
If a filename is a directory, cvs will recursively descend through the directory and commit all modified or added files.
In the first version the comment is given inline.
In the second version cvs will open an editor window to allow you to give a longer comment.
There are separate instructions for adding a directory. Adding a new file is a three step process.
Create the file(s)
cvs add filename(s)
cvs commit -m "Comment" filename(s)
In the add and commit commands, you can use wildcards and/or you may list several files on one line. Be careful with wildcards so that you do not add or commit unintended files. If you accidentally add a file, simply skip the commit for that file.
You cannot commit an empty directory. You must create a file in the directory first.
Create one or more files
cvs add directoryname
cvs add directoryname/file1 directoryname/file2 ...
cvs commit -m "Comment text." directoryname
This will add and commit both the directory and all of the files that you added in step 6.
cvs remove file(s)
cvs commit -m "Comment text" file(s)
You must rm the file before issuing the cvs remove command.
The remove is not final until the commit has been issued.
cvs does not let you remove directories. However it does let you ignore any directories that are empty.
cvs co -P Offline
cvs update -PdA
In both cases, the -P option says to prune empty directories.
If you remove all ordinary files from a directory tree, leaving only subdirectories, then the -P option will skip the full directory tree.
cvs update -PdA
The options mean:
P: Prune empty directories
d: create new directories
A: Reset sticky tags
This changes only files in your working copy. No changes are made to the respository. If there were no conflicts between changes made in your working copy and changes made in the repository, then cvs update will sync your working copy with changes from the repository. This includes adding new files from the repository, deleting files that were deleted in the repository and changing files that were changed in the repository.
If you want your changes to be put in the repository you still must do a cvs commit. cvs will do this recursively, starting in your current working directory and working down through the directory tree.
check the history and the commit comments for a specific file
cvs log filename
some useful history commands
cvs history -c -a -D "1 day ago" -z CDT
find all changes submitted to the repository by anyone in the past day
cvs history -c -a -D "1 day ago" -f Mu2eG4/src -z CDT
find all changes submitted to Mu2eG4/src (or any other subdirectory) by anyone in the past day
cvs history -c -u user "1 day ago" -f Mu2eG4/src -z CDT
find all changes submitted by user to Mu2eG4/src in the past day
The -z CDT argument tells cvs to print the dates in CDT time ( Central Daylight Time - Fermilab summer time ). You can substitute other time zone abbreviations
command line help
cvs -H command e.g., cvs -H history
cvs tag tag [files ...]
cvs tag -c tag [files ...]
cvs rtag tag module [module...]
Here tag is the name of the tag, for example v1_2_3.
"cvs tag" takes as arguments the names of checked out files whereas "rtag" takes as arguments the names of modules in the repository.
For cvs tag:
If a named file is a directory, then cvs tag will work recursively down through that directory.
If no files are named, then cvs tag will work recursively down from the current working directory.
Before tagging, make sure that your current working copy is up to date with the respository: the thing that is tagged is the version at the head of the repository, not your working copy. Another way to say this is that tag does not have an implied commit.
The -c option will check the named files to make sure that all files are up to date with the repository before tagging. If there are any problems, nothing is tagged.
For cvs rtag:
The tag is placed on files at the head of repository.
cvs tag -r revision -F tag [files ...]
where revision is the internal cvs revsion number of the version which is to receive the tag and where tag is the name of the tag to be moved. Never move a tag on code that has been used to create results that are in any way "official"; if it is necessary to bug fix production code, use a branch instead of moving tags.
- Checking the status of a file.
cvs status filename
where filename is the name of a checked out file. This command will let you know if the checked out version of the file is in sync with the repository, if the file has been modified since you checked it out or if the repository version of the file has been modified since you checked it out.
- Other information about a file
cvs log filename
where filename is the name of a checked out file. This command will print out information about all existing versions of the file, including all of the comments made at commit-time. The printout includes the list of which revision numbers belong in which tag.