<<< Date Index >>>     <<< Thread Index >>>

Re: CVS repository changes: which software is used for posting changes



I'm using the attached script for that.  The first argument to the
script is a directory which is supposed to hold a checked-out copy
of the software; the second argument is an e-mail address.

Regards,
-- 
Thomas Roessler · Personal soap box at <http://log.does-not-exist.org/>.






On 2003-08-31 23:12:49 +0200, andreas.gredler@xxxxxx wrote:
> From: andreas.gredler@xxxxxx
> To: mutt-dev@xxxxxxxx
> Date: Sun, 31 Aug 2003 23:12:49 +0200
> Subject: CVS repository changes: which software is used for posting changes
> Mail-Followup-To: mutt-dev@xxxxxxxx
> X-Spam-Level: 
> 
> Hi,
> 
> As I'm also using cvs-servers from time to time I was wondering how to
> automatically send a report as it is done on this list. I just know
> that cvs is able to send a mail after a user has committed changes but
> how is it solved to do this every 48 hours?
> 
> greets Jimmy
> 
> -- 
> Andreas "Jimmy" Gredler, andreas.gredler@xxxxxx
> Get my public key at www.g-tec.co.at
> 

#!/bin/sh

TZ=GMT; export TZ
PATH=/usr/local/bin:$PATH; export PATH

CVSLOG2CHANGELOG=$HOME/bin/cvslog2changelog.pl

DIR="$1"
TO="$2"

subject="[`date +%Y-%m-%d`] CVS repository changes"

cd $DIR || { echo "$0: Can't cd to $DIR." >&2 ; exit 1; }
cvs update
cvs log -d ">$(date -d '48 hours ago' +%Y/%m/%d)" |     \
        perl $CVSLOG2CHANGELOG |
(
        cat << EOF
This message was generated and sent automatically.  It contains a
summary of the CVS commits over the last 48 hours.  These changes
should be propagated to the public repository within at most a day
or two.  Most probably, they have already been propagated.


EOF
        fmt -c
) | mutt -s "$subject" "$TO"