Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jun 1999 13:45:22 -0400
From:      Tim Vanderhoek <vanderh@ecf.utoronto.ca>
To:        The Hermit Hacker <scrappy@hub.org>
Cc:        freebsd-chat@freebsd.org
Subject:   Re: Proposal: Split up cvs-all mailing list?
Message-ID:  <19990608134522.A7547@mad>
In-Reply-To: <Pine.BSF.4.05.9906081329340.49155-100000@thelab.hub.org>; from The Hermit Hacker on Tue, Jun 08, 1999 at 01:31:27PM -0300
References:  <Pine.BSF.4.05.9906081329340.49155-100000@thelab.hub.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 08, 1999 at 01:31:27PM -0300, The Hermit Hacker wrote:
> 
> 	Is this doable?  Is this something I could just as easily
> configure in my procmail that I'm overlooking?

I can't say whether it's doable or not, but here's snip from my
.procmailrc (it certainly doable from within procmail --- everything
is doable from within procmail ;-)...  I recall I hacked this together
pretty quickly, be warned...

I think by the "# This has races" comment I meant that the part where
it adds a "mailboxes" line to boxes/mailboxes has races.  It doesn't
matter for me since I always run it in series, but you probably want
to either remove that code or fix it up (not entirely trivial).

To make it split-up on RELENG_3 you'll need a line something like

:0 B
* RELENG_3
{ LISTS="$LISTS all-stable" }

[That won't work quite right, but I can't find a -stable commit in my
list.cvs-committers right now that gives a better search string].

Also, note that on really large commits the subject line gets
truncated when it's sent to cvs-all/cvs-committers.  I should really
be grepping the message body, not the subject, to find where it
belongs, but then a little more work would be needed to avoid putting
replies into the wrong box.


# break-up cvs-committers
:0 
* ^Sender: owner-cvs-committers@FreeBSD.ORG
* ^Subject: cvs commit:
{
	# URLify
	PERLSCRIPT='
		while (<>) {
			if (/^\s+(\d+\.)+\d+\s+\+\d+ \-\d+\s+/) {
				$r = $_;
				$r =~ s/.*?([a-z]+\/.+)/http\:\/\/www.FreeBSD.ORG\/cgi\/cvsweb\.cgi\/\1/;
				$l = "$l$r";
			}
			print "$_";
		}
		print "$l";
	'
	:0 bf
	| perl -e "${PERLSCRIPT}"

	:0
	* ^Subject:.*ports/
	{ LISTS="$LISTS list.cvs-committers.ports" }
	:0 B
	* ^ports/
	* CVSROOT/modules
	{ LISTS="$LISTS list.cvs-committers.ports" }
	:0
	* ^Subject:.*src/release
	{ LISTS="$LISTS list.cvs-committers.src.release" }

	:0
	* ? [ "$LISTS" = "" ]
	{ LISTS="list.cvs-committers" }

	# This has races.  This doesn't LOG new mailbox creation.
	DELIVER='
		cat /dev/stdin > /tmp/proc.msg.$$;
		for i in $LISTS;
		do
			lockfile ${i}.lock;
			cat /tmp/proc.msg.$$ >> $i;
			rm -f ${i}.lock;
			if ! grep $i boxes/mailboxes;
			then
				echo "mailboxes ="$i >> boxes/mailboxes;
			fi;
		done;
		rm -f /tmp/proc.msg.$$
	'
	:0
	| sh -c "${DELIVER}"
}


-- 
This is my .signature which gets appended to the end of my messages.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990608134522.A7547>