The following are wrappers around the basic CVS commands. These scripts give you initial booster-push into the CVS system and are useful untill you become very familiar with the CVS commands. The scripts are written for Korn shell since korn shell is always available on all flavors of unixes, but you can translate to bash or PERL if needed. You can customize these scrips to your taste. They are basically CVS commands but features are added to make it site specific. For example, sedit script provides locking so that users will know some-one is editing the file. Of course users can directly use the CVS commands to by-pass these scripts. These scripts demonstrate how CVS can be customized to a great extent.
NOTE: The wrapper shell scripts assume that the user's home directory as the root and check out the tree from cvs to build the tree underneath user's home directory.
TIP: In shell scripts, every target filename is composed of 3 parts - Home directory, sub-directory and the filename. The full-path is $HOME/$subdir/$fname And in CVS the same directory structure is maintained (by variable $subdir) therefore in cvs there will be something like $CVSROOT/$subdir/$fname. In all scripts, these 4 variables $HOME, $CVSROOT, $subdir and $fname play an important role. For example, sample values can be like HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot and fname=foo.cpp
Copy these scripts to /usr/local/bin and this should be in the user's PATH environment.
sdif -r rev1 -r rev2 <filename> To get the diff of your file with CVS. Click sdif
NOTE: sdif has only one 'f' because there is already another unix command called 'sdiff'
For example :
cd $HOME; sfreeze REVISION_1_0 srctree
******************************************************