[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: generating logs to mail out from a repository, not checked out code?

From: Stuart Stevens
Subject: RE: generating logs to mail out from a repository, not checked out code?
Date: Mon, 8 Nov 2004 18:58:26 -0800

Is using Perls built-in mailer a solution?


-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf
Of Todd Denniston
Sent: Monday, October 04, 2004 8:37 AM
To: Carl Brewer
Cc: address@hidden
Subject: Re: generating logs to mail out from a repository,not checked out

Carl Brewer wrote:
> Hello,
> I'm trying to get an email summary of changes to an entire
> repository.  I have a repository : /home/scvs/repository,
> which is accessed both from a chrooted pserver, and ssh
> logins.  We were using the usual entry in CVSROOT/loginfo
> to generate emails when commits are made, but hacking
> a mailer into our chroot directory is not something I'd
> like to do unless there's no alternative.  I've just recently
> set up the chroot'ed pserver, and this is the bit I need
> to set so it'll send emails when something happens.
> I had a look at, which can generate summary
> logs by time for a checked out copy, but I want to be able
> to run something on the repository server itself to send out mails
> when commits are made, or send a summary every N minutes.
> Does anyone have any suggestions?  It seems a little heavy
> to run a cronjob to check out everything in the repository on the server
> every 10 mins and then run cvs -l over it, but is that
> my only way to do this short of hacking at my chroot dir to
> make my MTA behave?
How about having a directory that the cron job user can access, also having
loginfo just touch a file loginfo.out, and do 

if [ $CHROOT_LOCATION/loginfo.out -nt Changelog ]
        cvs update -Pd -l "-d \"2004-08-09 < 2004-10-09\""

results in 
1) not disturbing your chroot jail.
2) only using a little disk space.
3) only checking when there has been a checkin.

or a simpler thing might be to have loginfo gen some output as before but
append the output in a file, and a cron check as follows
if [ $CHROOT_LOCATION/loginfo.out -nt localcopy ]
        mv $CHROOT_LOCATION/loginfo.out $worklocation/localcopy
        touch $CHROOT_LOCATION/loginfo.out
        #make sure we are later
        touch $worklocation/localcopy
        mail address@hidden < localcopy

> This is for a redhat gnu/linux box.
> thanks for any suggestions,
> Carl

Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane) 
Harnessing the Power of Technology for the Warfighter

Info-cvs mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]