README.cvsupchk
---------------

cvsupchk is a python script that checks a CVSup maintained directory
hierarchy against the corresponding CVSup checkouts file. It looks for
a number of anomalies: missing checked out files, deleted files being
present, extra RCS files, 'dead' directories being present and so on.

Why is a tool like this necessary?

o CVSup by default will not touch files that it does not 'know' about
  (i.e. files that don't exist on the master servers tree).  Thus
  'extra' files like core dumps and temporary files from aborted
  cvsup sessions are silently ignored and add to the clutter in the
  directory hierarchy.

o Some users initially populate a local copy of the CVS repository 
  from a CDROM and then rely on CVSup to keep the local copy uptodate.  
  However, files (and directories) that were deleted from the main 
  repository after the CDROM was cut will not be touched by CVSup.
  These `extra' RCS files can cause varying amounts of grief when
  you begin to use the repository.


The script has two modes of operation: the default mode assumes that
we are checking a CVS repository.  Specifying the '-c' option tells
the script to work in checkouts mode.  The '-r' option allows you to
examine a specified subset of the source tree which is useful when you
want to check the crypto subtree alone.


Examples:
---------

Example 1: Check the FreeBSD CVS repository under /home/ncvs.

    $ ./cvsupchk -d /home/ncvs /usr/sup/src-all/checkouts.cvs
    EXTRA: /home/ncvs/CVSROOT/val-tags
    EXTRA: /home/ncvs/src/bin/ed/test/#cvs.rfl.freebsd.3283
    EXTRA: /home/ncvs/src/bin/ed/test/#cvs.rfl.freebsd.2133
    EXTRA: /home/ncvs/src/contrib/cvs/contrib/Attic
    EXTRA: /home/ncvs/src/contrib/nvi/perl_api/#cvs.rfl.freebsd.932
    EXTRA: /home/ncvs/src/gnu/lib/libgmp/doc/Attic
    EXTRA: /home/ncvs/src/gnu/usr.bin/patch/Attic
    EXTRA: /home/ncvs/src/gnu/usr.bin/sort/#cvs.rfl.freebsd.1211
    EXTRA: /home/ncvs/src/gnu/usr.bin/texinfo/Attic
    EXTRA: /home/ncvs/src/share/mk/#cvs.rfl.freebsd.22676
    EXTRA: /home/ncvs/src/sys/netns/Attic
    EXTRA: /home/ncvs/src/#cvs.rfl.freebsd.170          

    As you can see my CVS repository has a lot of junk in it :).

Example 2: Usage of the -r restriction option.

    $ cvsupck -d /home/ncvs -r src/crypto /usr/sup/src-crypto/checkouts.cvs

    will check files and directories under /home/ncvs/src/crypto ...

Example 3: Usage of the -c (checkouts mode) option.

    $ cvsupchk -d /a/ncvs -c /usr/sup/ports-x11/checkouts.cvs:.

    will check the 'checked out' directory tree for the
    ``ports-x11'' collection.


Example 4: Get usage

    $ ./cvsupchk -\?
    ERROR: option -? not recognized
    Usage: cvsupchk [options]
	    OPTION            DESCRIPTION          DEFAULT
	    -c              : checkouts mode       [repository mode]
	    -d directory    : specify CVS Root     [$CVS_ROOT in environment]
	    -r regexp       : specify restrictions [no restrictions]


Bugs:
-----
	This script could have been written using awk and shell.


See also:
---------
	cvsup(1)		/usr/ports/net/cvsup/
	python(1)		http://www.python.org/

Author:
-------
	Joseph Koshy <jkoshy@freebsd.org>
