The following are wrappers around the basic CVS commands. These scripts give you initial booster-push into the CVS system and are useful until you become very familiar with the CVS commands. The scripts are written for Korn shell since it is always available on all flavors of Unix, but you can translate to bash or Perl if needed. You can customize these scripts to your taste. They are basically CVS commands, but features are added to make it site specific. For example, the sedit script provides locking so that users will know someone is editing the file. Of course users can directly use the CVS commands to bypass these scripts. These scripts demonstrate how CVS can be customized to a great extent.
NOTE: The wrapper shell scripts assume 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 these 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
******************************************************