Re: Adding diffs to commit-mail on the fly

2002-06-08 Thread David O'Brien

On Sat, Jun 01, 2002 at 04:17:54AM +0300, Giorgos Keramidas wrote:
 The idea was resting at the back of my mind, and tonight I hacked this
 Perl script that seems to mostly do what I want, when I pipe a single

There's is also the `cvsmail' port that does that.

:0 bf
* ^Sender:.*owner-(freebsd-)?cvs-(committers|all)@.*FreeBSD.ORG
| cvsmail

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: Adding diffs to commit-mail on the fly

2002-06-02 Thread Matthew Dillon


:
:Hi Matt and everyone,
:
:I remember that Matt had mentioned adding diffs of the commits to the
:commit-mail, which would make it possible to quickly view what changed
:without leaving the MUA and manually searching for the proper CVS
:diff/rdiff incantation to view the diff.
:
:The idea was resting at the back of my mind, and tonight I hacked this
:Perl script that seems to mostly do what I want, when I pipe a single
:message to it's STDIN in mbox format.  Given a script in Perl or awk
:...

Very cool!  I'm mostly unavilable for the weekend but when I get back
I'll look into integrating your perl script with the filter I've
been working on.  The filter is mostly done but I hadn't written
the part that generates the commit diff yet. You script may be just
the ticket.

-Matt

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: Adding diffs to commit-mail on the fly

2002-06-01 Thread Wilko Bulte

On Sat, Jun 01, 2002 at 07:49:52AM +0300, Giorgos Keramidas wrote:
 On 2002-05-31 20:08 -0700, Brooks Davis wrote:
  On Fri, May 31, 2002 at 09:32:26PM -0500, Brandon D. Valentine wrote:
   On Sat, 1 Jun 2002, Giorgos Keramidas wrote:
   Indeed.  Brain cells shutting down already.  I shouldn't read procmail
   rules after I get sleepy.  The 'f' flag of procmail seems like, aw mee
   gods, so fine ;-)))
   
   Cool.  If I might make another suggestion, you will likely get faster
   performance and in general make people happier if you only run this
   script against your own personal mirror of the CVS repo so as not to tie
   up anoncvs.freebsd.org.
  
  There's a rather serious problem with that idea...  I'm actually not
  sure even anoncvs.freebsd.org will work since I get commit mail pretty
  close to instantly after I do a commit and I know my repository isn't up
  to date by then.  I'd be slightly suprised if anoncvs.freebsd.org was
  either.
 
 Well, yep.  I want to test this with a bunch of good ole' commits logs
 first, and make sure it works as expected.  Then the plan is to
 integrate this to the CVSROOT scripts of FreeBSD and make sure one can
 choose whether diffs are sent by something similar to CVSROOT/access.
 
 If that works reasonably well, then perhaps we can have the following:
 
 cvs-all-diff
   A list like cvs-all is now, where anyone can subscribe and
   receive diff output as long as normal commit logs.  This has
   the advantage that cvs-all remains as it is today, and those
   who want to also get patches in their mailboxen unsubscribe
   from cvs-all and subscribe to cvs-all-diff instead.
 
 committers
   Nothing changed in cvs-all, but let committers get diffs.
   This leaves things unchanged for cvs-all, but lets committers
   receive diffs too, while everyone who is subscribed in cvs-all
   continues to receive shorter mail.  (Bandwidth is not cheap

I would like to be able to select the short mail as well (as a committer).
Is that reasonably feasible?

-- 
|   / o / /_  _ [EMAIL PROTECTED]
|/|/ / / /(  (_)  Bulte Arnhem, the Netherlands

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: Adding diffs to commit-mail on the fly

2002-06-01 Thread Giorgos Keramidas

On 2002-06-01 10:00 +0200, Wilko Bulte wrote:
 On Sat, Jun 01, 2002 at 07:49:52AM +0300, Giorgos Keramidas wrote:
  cvs-all-diff
  committers
  Nothing changed in cvs-all, but let committers get diffs.

 I would like to be able to select the short mail as well (as a committer).
 Is that reasonably feasible?

After I check out the existing functionality that somehow crept in
without me noticing at all.  Dima Dorfman has pointed me to cfg.pm and
various existing configuration options already :)

I am essentially looking for a way to do this with fine-grained
control, as you suggest.  Say something like:

[plan a]
committer A wants to get diffs, but only for doc/en_US* files.
committer B wants to get diffs for everything, except for src/sys/*

Making this work for mailing lists too is really out of my reach for
now, since I can't think of some way to make it happen *AND* allow for
fine-grained control of when to put diffs in the posted message.

I think that playing with the existing CVSROOT for a while and trying
to make something like plan [a] above seems a nice idea.  But I can't
promise I'll have anything working until I read what Dima haspointed
out.  At least, I learned another bit of Perl last night[1] :)

- Giorgos

[1] Perl might be on its way out of the base, but I still like it.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: Adding diffs to commit-mail on the fly

2002-05-31 Thread Brandon D. Valentine

On Sat, 1 Jun 2002, Giorgos Keramidas wrote:

Given a script in Perl or awk
or whatever that works like this one, how would you all integrate this
with procmail to let it filter all the commit mail of FreeBSD?

Assuming your script works, here's the procmail hoodoo:

:0 fw
* ^List-Id: cvs-all.FreeBSD.ORG
| /path/to/filter/script

Insert this rule into your .procmailrc anywhere above where you actually
filter cvs-all to a specific folder.

Brandon D. Valentine
-- 
http://www.geekpunk.net [EMAIL PROTECTED]
++[++-][++-].[+-][+-]+.+++..++
+.+[++-]++.+++..+++.--..+.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: Adding diffs to commit-mail on the fly

2002-05-31 Thread Giorgos Keramidas

On 2002-05-31 20:53 -0500, Brandon D. Valentine wrote:
 On Sat, 1 Jun 2002, Giorgos Keramidas wrote:
 
 Given a script in Perl or awk
 or whatever that works like this one, how would you all integrate this
 with procmail to let it filter all the commit mail of FreeBSD?
 
 Assuming your script works, here's the procmail hoodoo:
 
 :0 fw
 * ^List-Id: cvs-all.FreeBSD.ORG
 | /path/to/filter/script
 
 Insert this rule into your .procmailrc anywhere above where you actually
 filter cvs-all to a specific folder.

The problem with this is that I would have to hardwire the output
folder name to the script, or pass it as a parameter.  I've found two
answers until now, by reading my manpages [beats head]. One is:

:0 H
* ^sender: [EMAIL PROTECTED]
| /path/to/filter freebsd-cvs-all

But 'm not sure if this will let procmail lock the folder properly.

My intention was to add something like:

:0 H
* ^sender: [EMAIL PROTECTED]
* ! ^X-inline-diff: yes
| /path/to/filter | formail -I 'X-Inline-Diff: yes' -s procmail

:0 H
* ^sender: [EMAIL PROTECTED]
freebsd-cvs-all

Reading up my formail/procmail manpage helped a bit.
Off to yet more testing :)

- Giorgos


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: Adding diffs to commit-mail on the fly

2002-05-31 Thread Brandon D. Valentine

On Sat, 1 Jun 2002, Giorgos Keramidas wrote:

On 2002-05-31 20:53 -0500, Brandon D. Valentine wrote:
 Assuming your script works, here's the procmail hoodoo:

 :0 fw
 * ^List-Id: cvs-all.FreeBSD.ORG
 | /path/to/filter/script

The problem with this is that I would have to hardwire the output
folder name to the script, or pass it as a parameter.  I've found two
answers until now, by reading my manpages [beats head]. One is:

Nonsense.  With the rule I gave you your script should take the message
on stdin, modify it, and spit it back out on stdout where it will
continue to fall through the procmail rules.  That's what the 'f' option
at the start of the rule is all about.  You end up with two succesive
rules like this:

:0 fw
* ^List-Id: cvs-all.FreeBSD.ORG
| /path/to/filter/script

:0:
*^ List-Id: cvs-all.FreeBSD.ORG
cvs-all

Make sense?

Brandon D. Valentine
-- 
http://www.geekpunk.net [EMAIL PROTECTED]
++[++-][++-].[+-][+-]+.+++..++
+.+[++-]++.+++..+++.--..+.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: Adding diffs to commit-mail on the fly

2002-05-31 Thread Giorgos Keramidas

On 2002-05-31 21:18 -0500, Brandon D. Valentine wrote:
On Sat, 1 Jun 2002, Giorgos Keramidas wrote:
On 2002-05-31 20:53 -0500, Brandon D. Valentine wrote:
 Assuming your script works, here's the procmail hoodoo:

 :0 fw
 * ^List-Id: cvs-all.FreeBSD.ORG
 | /path/to/filter/script

The problem with this is that I would have to hardwire the output
folder name to the script, or pass it as a parameter.  I've found two
answers until now, by reading my manpages [beats head]. One is:
 
 Nonsense.  With the rule I gave you your script should take the message
 on stdin, modify it, and spit it back out on stdout where it will
 continue to fall through the procmail rules.  That's what the 'f' option
 at the start of the rule is all about.  You end up with two succesive
 rules like this:
 
 :0 fw
 * ^List-Id: cvs-all.FreeBSD.ORG
 | /path/to/filter/script
 
 :0:
 *^ List-Id: cvs-all.FreeBSD.ORG
 cvs-all
 
 Make sense?

Indeed.  Brain cells shutting down already.  I shouldn't read procmail
rules after I get sleepy.  The 'f' flag of procmail seems like, aw mee
gods, so fine ;-)))

- Giorgos


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: Adding diffs to commit-mail on the fly

2002-05-31 Thread Brandon D. Valentine

On Sat, 1 Jun 2002, Giorgos Keramidas wrote:

Indeed.  Brain cells shutting down already.  I shouldn't read procmail
rules after I get sleepy.  The 'f' flag of procmail seems like, aw mee
gods, so fine ;-)))

Cool.  If I might make another suggestion, you will likely get faster
performance and in general make people happier if you only run this
script against your own personal mirror of the CVS repo so as not to tie
up anoncvs.freebsd.org.

Brandon D. Valentine
-- 
http://www.geekpunk.net [EMAIL PROTECTED]
++[++-][++-].[+-][+-]+.+++..++
+.+[++-]++.+++..+++.--..+.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: Adding diffs to commit-mail on the fly

2002-05-31 Thread Brooks Davis

On Fri, May 31, 2002 at 09:32:26PM -0500, Brandon D. Valentine wrote:
 On Sat, 1 Jun 2002, Giorgos Keramidas wrote:
 
 Indeed.  Brain cells shutting down already.  I shouldn't read procmail
 rules after I get sleepy.  The 'f' flag of procmail seems like, aw mee
 gods, so fine ;-)))
 
 Cool.  If I might make another suggestion, you will likely get faster
 performance and in general make people happier if you only run this
 script against your own personal mirror of the CVS repo so as not to tie
 up anoncvs.freebsd.org.

There's a rather serious problem with that idea...  I'm actually not
sure even anoncvs.freebsd.org will work since I get commit mail pretty
close to instantly after I do a commit and I know my repository isn't up
to date by then.  I'd be slightly suprised if anoncvs.freebsd.org was
either.

-- Brooks

-- 
Any statement of the form X is the one, true Y is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4



msg34751/pgp0.pgp
Description: PGP signature


Re: Adding diffs to commit-mail on the fly

2002-05-31 Thread Giorgos Keramidas

On 2002-05-31 20:08 -0700, Brooks Davis wrote:
 On Fri, May 31, 2002 at 09:32:26PM -0500, Brandon D. Valentine wrote:
  On Sat, 1 Jun 2002, Giorgos Keramidas wrote:
  Indeed.  Brain cells shutting down already.  I shouldn't read procmail
  rules after I get sleepy.  The 'f' flag of procmail seems like, aw mee
  gods, so fine ;-)))
  
  Cool.  If I might make another suggestion, you will likely get faster
  performance and in general make people happier if you only run this
  script against your own personal mirror of the CVS repo so as not to tie
  up anoncvs.freebsd.org.
 
 There's a rather serious problem with that idea...  I'm actually not
 sure even anoncvs.freebsd.org will work since I get commit mail pretty
 close to instantly after I do a commit and I know my repository isn't up
 to date by then.  I'd be slightly suprised if anoncvs.freebsd.org was
 either.

Well, yep.  I want to test this with a bunch of good ole' commits logs
first, and make sure it works as expected.  Then the plan is to
integrate this to the CVSROOT scripts of FreeBSD and make sure one can
choose whether diffs are sent by something similar to CVSROOT/access.

If that works reasonably well, then perhaps we can have the following:

cvs-all-diff
A list like cvs-all is now, where anyone can subscribe and
receive diff output as long as normal commit logs.  This has
the advantage that cvs-all remains as it is today, and those
who want to also get patches in their mailboxen unsubscribe
from cvs-all and subscribe to cvs-all-diff instead.

committers
Nothing changed in cvs-all, but let committers get diffs.
This leaves things unchanged for cvs-all, but lets committers
receive diffs too, while everyone who is subscribed in cvs-all
continues to receive shorter mail.  (Bandwidth is not cheap
for some of the subscribers of cvs-xxx lists, so making them
receive patches might be an overkill.)

- Giorgos


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message