Tuesday, December 14, 2010

CVS Admin

Check out a project
/usr/local/bin/cvs -d :pserver:hsual@home.com:/usr/local/cvsroot checkout <prj>

Export a project
cvs -d :pserver:hsual@home.com:/usr/local/cvsroot login
cvs -d :pserver:hsual@home.com:/usr/local/cvsroot export -r <tag> <prj>

Adding files to a directory
$ mkdir -p foo/bar
$ cp ~/backend.c foo/bar/backend.c
$ cvs add foo
$ cvs add foo/bar
$ cvs add foo/bar/backend.c
$ cvs add backend.c
$ cvs commit -m "Early version. Not yet compilable." backend.c

Removing files
$ cd test
$ rm *.c
$ cvs remove
cvs remove: Removing .
cvs remove: scheduling a.c for removal
cvs remove: scheduling b.c for removal
cvs remove: use 'cvs commit' to remove these files permanently
$ cvs ci -m "Removed unneeded files"
cvs commit: Examining .
cvs commit: Committing .

Remove directories
Removing directory equals to removing files under the directory you want it to be removed. When you checkout the source with a -P option, cvs will remove the empty directory automatically.

Rename a file
$ mv old new
$ cvs remove old
$ cvs add new
$ cvs commit -m "Renamed old to new" old new

Move tag to current revision
cvs tag -c -F R240 myLogo.gif

Add comment to a file on version 1.3
cvs admin -m 1.3:"Comments for version 1.3" myLogo.gif

No comments: