After posting earlier today cvs rdiff command, which outputs the list of
files on the server without checking the module out, I played with the
command a little bit more and got it to print version numbers in addition to
the file list.

The output looks like that:

% cvsls HEAD admin tools
cvs server: Listing admin
admin/bldlog.pl         (1.4)
admin/cdstage.sh        (1.42)
admin/cronbuild         (1.39)
admin/env.build         (1.23)
admin/envar.readme      (1.1)
admin/makeall.sh        (1.18)
admin/ntbenv.bash       (1.1)
admin/ntbuild.bash      (1.6)
cvs server: Listing tools
tools/Makefile  (1.8)
tools/ermbld.csh        (1.5)
tools/ermbld.sh         (1.2)
tools/genDriverCmd.pl   (1.2)
tools/genUnMaster.pl    (1.1)

Here is the script itself. It is intentionally not fancy so that people can
add other command line parsing if desired.

------------------- cut here ------------------------------------------
#!/bin/sh

# lists files and directories in the module(s) on the server without
# checking them out

# cvsls BranchName modules...
# for main trunk use 'cvsls HEAD modules...'

branch=$1; shift

cvs rdiff -s -D 01/01/1970 -r $branch "$@"  2>&1 \
    | sed -e 's/File.//' \
                  -e 's/is new; current revision./      (/' \
                  -e 's/(\([0-9][\.0-9]*\)/(\1)/' \
                  -e 's/cvs server: Diffing/cvs server: Listing/'

------------------- cut here ------------------------------------------


Eugene.

Reply via email to