Actually, I think you want to edit loginfo. Here's what mine looks like:
(apologies for the wrapping. everything between the #'s should be one line.
#
^module1 ($CVSROOT/CVSROOT/autoupdate module1 %s &) >>
$CVSROOT/CVSROOT/module1.log 2>&1
#
^module2 ($CVSROOT/CVSROOT/autoupdate module2 %s &) >>
$CVSROOT/CVSROOT/module2.log 2>&1
#
ALL (echo "--<seperator>--"; date; id; echo $USER; echo %{sVv}; cat) >>
$CVSROOT/CVSROOT/all.log
#
then i've got a script in $CVSROOT/CVSROOT called autoupdate that looks like
this:
#! /bin/sh
#--------0---------0---------0---------0---------0--------0---------0---------0
# autoupdate
# Jun 23 1999 by shandy
# http://www.inline.net
#
# this file gets called from loginfo. It's purpose is to perform automatic
# updates to the directories in /development/src whenever an update is done
# to a cvs project.
#--------0---------0---------0---------0---------0--------0---------0---------0
#path to your cvs executable
CVSPATH=/usr/bin
#email address for when there's problems
[EMAIL PROTECTED]
#current directory so we can find timestamp after we cd
PWDIR=`pwd`
echo "------------< separator `date` >------------"
echo "timestamp" > $PWDIR/timestamp.autoupdate
#sleep to wait for the lock
sleep 2
# split up the variable (%s) into a directory name and a list of files
dirname=`expr "$2" : '\(.[^ ]*\)'` #match the first char followed by 0 or
#more non-space chars
filelist=`expr "$2" : '.[^ ]* \(.*\)'` #match all that follows "$dirname "
for fname in $filelist
do
# the root directory to put a particular module in
case $1 in
module1)
absdirname="/development/src/$dirname"
;;
module2)
absdirname="/development/src/$dirname"
;;
*)
echo "autoupdate:unknown cvs module name passed in from loginfo"
exit
;;
esac
# write out some information
echo "dir: $dirname file: $fname"
if [ -d $absdirname ]
then
#do nothing -- makes it an IF NOT
echo "nothing" > /dev/null
else
mkdir $absdirname
fi
cd $absdirname
pwd
#execute the cvs update
if [ -f $fname ]
then
$CVSPATH/cvs -q update -P $fname
else
$CVSPATH/cvs -q update -Pd $fname
fi
#check if it worked. if not mail someone and complain
# test if updated file is older than the beginning of this script
if [ $fname -ot $PWDIR/timestamp.autoupdate ]
then
echo "AUTOUPDATE `date` $absdirname $fname $1" \
| mail -s broken $EMAIL
fi
done
hope that helps.
andy
On Tue, 29 Feb 2000, Murtaza Chiba wrote:
> Hi,
> I would like to request examples of what goes into a commitinfo
> file.
> The situation I am most interested in, is to sync a replica. Appreciate
> your time. Thanks in advance.
>
> Thanks,
> Murtaza
--
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Shandy Brown (http://sjbrown.geeky.net)
Inline Internet Systems (http://www.inline.net)
iHTML (http://www.ihtml.com)
iHTML Merchant (http://www.ihtmlmerchant.com)
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<