#!/bin/sh

# notify the following users after a 'cvs commit'

users='abacus@informatik.uni-koeln.de'
tmp='.notify.message.tmp'

cat >$tmp <<EOF
Please update your working copy. Use

cvs update

        to merge the changes of the newest revision to your working
        copy. Local changes will never be lost. In case of conflicts
        your original FILE will be saved in .#FILE.REVISION.
        Overlapping conflicts will be displayed and have to be resolved
        by editing the files.

cvs diff -r BASE -r HEAD

        to see the changes between the last update/commit/checkout of
        your working copy and the newest revision in the repository.
        (compares the 'BASE' revision with the 'HEAD' revision)

cvs diff -r HEAD

        to see the changes between the newest revision in the repository
        and your working copy.
        (compares the 'HEAD' revision with the local source)

cvs diff

        to see the local (uncommited) changes of your working copy
        since the last update/commit/checkout command.
        (compares the 'BASE' revision with the local source)

-----------------------------------------------------------------------

EOF

# wait a moment to let cvs free the lock
(sleep 3; cvs diff -D '2 minutes ago' -r HEAD >> $tmp 2>&1; /usr/ucb/Mail -s "ABACUS: some changes were committed to $1." $users <$tmp; rm -f $tmp) &
