CVS
[top]
Create new repository
Syntax:
cvs -d [repo directory] init
Example:
cvs -d /usr/local/cvsroot init
Creates a new repository for your source code. This repository is where your source code will be stored along with knowledge of all the changes made.
[top]
Add directories
Syntax:
cvs -d [repo directory] import -m [message] [directory] [vendor name] start
Example:
cvs -d /usr/local/cvsroot import -m "Created cati directory structure" my_dept my_company start
Creates directories in the repository.
[top]
Add directories within an existing module
Syntax:
cvs -d [repo directory] add [directory]
Example:
cvs -d /usr/local/cvsroot import add morestuff
Creates a directory within a module.
[top]
Add files (mark for addition)
Syntax:
cvs -d [repo directory] add [filename]
Example:
cvs -d /usr/local/cvsroot add test.php
Marks a file to be added to the repository.
Add files (permanently add)
Syntax:
cvs -d [repo directory] commit [filename]
Example:
cvs -d /usr/local/cvsroot commit test.php
Adds a file permanently to the repository.
[top]
Remove directories
* This can not be done explicitedly through CVS. You have to hack the cvs repo manually.
Find the directory in the repo and just remove it. ( I know ... this is dumb, I agree. )
[top]
Remove files (mark)
cvs -d [repo directory] remove [filename]
Example:
cvs -d /usr/local/cvsroot remove test.php
Marks a file to be removed from the repository.
Remove files (permanently)
Syntax:
cvs -d [repo directory] commit [filename]
Example:
cvs -d /usr/local/cvsroot commit test.php
Removes a file permanently from the repository.
[top]
Checkout directories/files
Syntax:
cvs -d [repo directory] checkout [dirname]
Example:
cvs -d /usr/local/cvsroot checkout public_bin
Get directories and files from the repository to be modified.
[top]
Remove a checked-out directory
Syntax:
cvs -d [repo directory] release -d [dirname]
Example:
cvs -d /usr/local/cvsroot release -d httpd
Remove a directory which you are done with.
[top]
Roollback to previous version
Syntax:
cvs -d [repo directory] diff -r [version number to rollback to] [filename] | patch -R
Example:
cvs -d /usr/local/cvsroot diff -r 1.4 myprog.pl | patch -R
Rollback to version 1.4 of myprog.pl.
[top]
View file revisions
Syntax:
cvs -d [repo directory] log [filename]
Example:
cvs -d /usr/local/cvsroot log test.php
Lists all version revisions for a file
[top]
View differences between file versions
Syntax:
cvs -d [repo directory] diff -r [version number] -r [version number] [filename]
Example:
cvs -d /usr/local/cvsroot diff -r 1.1 -r 1.2 httpd.conf
List file differences from one version to the next.
[top]
View repository history
Syntax:
cvs -d [repo directory] history
Example:
cvs -d /usr/local/cvsroot history -e -z e (get history for everyone, using eastern timezone for time displays)
Lists the history of the repository.
Cheatsheets






