Notes on CVS Usage
References
The following is some good references or starting point to explore
- developer.gnome.org/tools/cvs.html
- cvs.gnome.org
- www.cyclic.com/CVS
- cvsbook.red-bean.com
Environment Setup
Use environment variables and config file to change default behavior
$ export CVSROOT=":pserver:usrid:passwd@host:/path/to/repos" $ export CVSROOT=":pserver:anonymous@host:/path/to/repos" $ export CVSROOT=":ext:usrid:passwd@host:/path/to/repos" $ export CVS_RSH="ssh"
Default options for normal CVS operation
# Edit $HOME/.cvsrc
# vim ~/.cvsrc
+ cvs -z3
+ diff -u
+ update -dP
Getting source from CVS server
Checking what is available from the repos.
$ cvs checkout -c
Synchronize remote copy to local copy (make local copy up-to-date)
# notes: it will copy the newer copies from server to client # if you have modified a local file, merge conflict MAY exists $ cvs update [specific-filename]
Checking File Status
Checking general information:
$ cvs status ChangeLog $ cvs status -v ChangeLog $ cvs log ChangeLog
Diff Head vs. Local copy:
# see the diff between head's file and local file $ cvs diff xaux_ext_common.c
Diff vs. Specified revision:
# see the diff against a specified revision # the string after '-r' is the revision num, check it with cvs log $ cvs diff -r 1.1.1 xaux_ext_common.c $ cvs diff -D 09/30/2003 xaux_ext_common.c $ cvs diff -D 20030930 xaux_ext_common.c # see the diff between two specified revision $ cvs diff -r 1.2 -r 1.1.1 xaux_ext_common.c
Doing a Release
Procedure for doing a "release"
Preliminary Work
Basically, not CVS topc, it is more autotools topic and release engineering topics.
# Preparation Works (Must do) # Wrote changelog for the release # Update configure.ac for new release name
Make a tag in CVS
Create a tag on CVS
# notes: a release is different from branch # thizinput-1-0-5 is a symbolic name (one [-a-zA-Z0-9_]) # the last agru '.' refers curr. dir. $ cvs tag -c thizinput-1-0-5 .
Checkout and make tarball (make dist)
Again, it is autotools and release engineering topic.
# checkout source from cvs, configure and make a dist tarball. # the format for the following cmd is # cvs checkout -r [tag-name] -d [local-dir] [module-name] $ cvs checkout -r thizinput-1-0-5 -d thizinput-1.0.5 thizinput # Run autogen.sh and make tarball $ cd thizinput-1.0.5 $ acfiles/autogen.sh $ ./configure --sysconfdir=/etc --silent $ make dist
Moving existing tag
Useful when you miss something in a release, for example, forget to update autoconf, you can update and commit it. And do a cvs tag move so you don't need to make a new tag/release for only one minor changes
$ cvs tag -c -F thizinput-1-0-5 .
Make a Branch
Make a tag in CVS
Notes that, a 'release' is different from branch
# thizinput-1-0-12 is a symbolic name (one [-a-zA-Z0-9_])
$ cvs tag -b -r thizinput-1-0-12 thizinput-1-0-12-patches thizinput