Date: Fri, 07 Feb 2003 13:08:35 -0800 From: Peter Wemm <peter@wemm.org> To: "Jacques A. Vidrine" <nectar@FreeBSD.org> Cc: all-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-ports@FreeBSD.org, cvs-doc@FreeBSD.org, cvs-all@FreeBSD.org, legacy-committers@FreeBSD.org Subject: Re: cvs commit: CVSROOT access access.doc access.ports Message-ID: <20030207210835.1D4992A89E@canning.wemm.org> In-Reply-To: <20030207175347.GA91623@opus.celabo.org>
next in thread | previous in thread | raw e-mail | index | archive | help
"Jacques A. Vidrine" wrote:
> On Fri, Feb 07, 2003 at 09:35:38AM -0800, Peter Wemm wrote:
> > Jacques Vidrine wrote:
> > > nectar 2003/02/07 09:14:33 PST
> > >
> > > Modified files:
> > > . access access.doc access.ports
> > > Log:
> > > OK, I think it is safe to split out src, ports, doc mail now.
> > > I suppose I shall get duplicates on all-committers, but so it goes.
> >
> > all-committers doesn't do duplicates. It merges the lists together and
> > de-dups the recipients before generating the email.
>
> By then it is too late, if you have different email addresses for
> different `access' files.
>
> This could work by having commitmail.pl doing the uniq ... it is doing
> some already. Something like the following (untested).
It already does.. hub:/etc/aliases:
all-committers: "|/g/mail/commitmail.pl all-committers \
/home/ncvs/CVSROOT/access /home/mail/src-access \
/home/ncvs/CVSROOT/access.ports /home/mail/ports-access \
/home/ncvs/CVSROOT/access.doc /home/mail/doc-access \
/home/projcvs/CVSROOT/access /home/mail/projects-access \
/home/ncvs/CVSROOT/access.master /home/mail/access.master",
Note the pairs of lists.. A cron job takes a backup of the source
lists and keeps them locally in case the NFS link is ever broken.
commitmail tries the first live list, then the second as a fallback.
And commitmail.pl:
...
@names = ();
while ($#ARGV > 0) {
$access = shift(@ARGV);
$access2 = shift(@ARGV);
open(ACCESS, "< $access") || open(ACCESS, "< $access2") || exit 75;
while (<ACCESS>) {
...
}
close(ACCESS);
}
%uniq = ();
grep($uniq{$_} = 1, @names);
$list = join(" ", sort keys %uniq);
...
Note the @names list has duplicates, while 'keys %uniq' does not.
all-committers doesn't simply send a seperate copy to
{src,ports,doc,...}-committers as that would cause lots of duplicates.
Footnote: I had a very disturbing conversation with some folks on IRC
about this. It turns out that there are many many different one-liner ways
to de-dup a list. Perl is a very "interesting" language, and Bill Fenner
makes me worry because he seems to know all the tricks. :-)
Cheers,
-Peter
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030207210835.1D4992A89E>
