From owner-cvs-all Fri Feb 7 13: 8:47 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E5E9837B401; Fri, 7 Feb 2003 13:08:40 -0800 (PST) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 43BBF43F3F; Fri, 7 Feb 2003 13:08:40 -0800 (PST) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id 1D4992A89E; Fri, 7 Feb 2003 13:08:35 -0800 (PST) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: "Jacques A. Vidrine" 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 In-Reply-To: <20030207175347.GA91623@opus.celabo.org> Date: Fri, 07 Feb 2003 13:08:35 -0800 From: Peter Wemm Message-Id: <20030207210835.1D4992A89E@canning.wemm.org> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "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 () { ... } 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