From Will_Lentz at Trimble.com Mon Apr 19 17:01:06 2004 From: Will_Lentz at Trimble.com (William Lentz) Date: Mon, 19 Apr 2004 10:01:06 -0700 Subject: [cvsspam-devel] Feature requests Message-ID: <7BA55C63511EC34EBB509058F50563B601E7277D@uss-am-xch-02.am.trimblecorp.net> This is a multi-part message in MIME format. ------=_NextPartTM-000-69b157ec-9a83-4b2d-ae6b-b4e2ba914fb3 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C4262F.E7792A54" ------_=_NextPart_001_01C4262F.E7792A54 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, First off, CVSspam is really good! Thanks :-). I had a couple ideas: 1- Some people can't receive HTML email. Maybe just add a "--plaintext_to" option and give a list of people would don't want HTML email? I tried simply running "sendmail" after "collect_diffs.rb" in CVSROOT/loginfo, but it appears only the first command run gets the CVS log info. 2- Right now all CVSspam headers are "[CVS
Hi,
First off, CVSspam is really = good! Thanks :-).
I had a couple ideas:
1- Some people can't receive HTML =
email. Maybe just add a "--plaintext_to" option and give =
a list of people would don't want HTML email? I tried simply =
running "sendmail" after "collect_diffs.rb" in =
CVSROOT/loginfo, but it appears only the first command run gets the CVS =
log info.
2- Right now all CVSspam headers are = "[CVS <dir>]". It would be nice to specify = different headers for different projects, e.g. "[MODULE_A = <dir>]". I've attached a simple patch that does this = using a "--header" option.
Also - is there an easy way to test = CVSspam without actually going through CVS? It's be nice to catch = typos before checking files into CVSROOT/.
Thanks,
Will
P.S. Sorry for any Ruby mistakes. = I'd never seen it before yesterday.
Index: cvsspam.rb
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
RCS file: =
/home/CVS/CVSROOT/cvsspam.rb,v
retrieving revision 1.1
retrieving revision 1.3
diff -u -r1.1 -r1.3
--- cvsspam.rb 16 Apr 2004 =
22:39:58 -0000 1.1
+++ cvsspam.rb 16 Apr 2004 =
23:29:07 -0000 1.3
@@ -890,13 +890,16 @@
require 'getoptlong'
opts =3D GetoptLong.new(
+ [ "--header", =
"-h", GetoptLong::REQUIRED_ARGUMENT ],
[ =
"--to", "-t", =
GetoptLong::REQUIRED_ARGUMENT ],
[ "--config", =
"-c", GetoptLong::REQUIRED_ARGUMENT ],
[ =
"--debug", "-d", GetoptLong::NO_ARGUMENT =
],
[ =
"--from", "-u", =
GetoptLong::REQUIRED_ARGUMENT ]
)
+$my_header =3D "CVS"
opts.each do |opt, arg|
+ $my_header =3D arg if =
opt=3D=3D"--header"
$recipients << arg =
if opt=3D=3D"--to"
$config =3D arg if =
opt=3D=3D"--config"
$debug =3D true if =
opt=3D=3D"--debug"
@@ -1009,7 +1012,7 @@
end
if $subjectPrefix =3D=3D =
nil
- $subjectPrefix =3D "[CVS =
#{Repository.array.join(',')}]"
+ $subjectPrefix =3D =
"[" + $my_header + " =
#{Repository.array.join(',')}]"
end
if $files_in_subject
Index: collect_diffs.rb
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
RCS file: =
/home/CVS/CVSROOT/collect_diffs.rb,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- collect_diffs.rb =
16 Apr 2004 22:45:54 -0000 1.3
+++ collect_diffs.rb =
16 Apr 2004 23:26:14 -0000 1.4
@@ -256,6 +256,7 @@
require 'getoptlong'
opts =3D GetoptLong.new(
+ [ "--header", =
"-h", GetoptLong::REQUIRED_ARGUMENT ],
[ =
"--to", "-t", =
GetoptLong::REQUIRED_ARGUMENT ],
[ "--config", =
"-c", GetoptLong::REQUIRED_ARGUMENT ],
[ =
"--debug", "-d", GetoptLong::NO_ARGUMENT =
],
@@ -265,7 +266,7 @@
# arguments to pass though to =
'cvsspam.rb'
$passthoughArgs =3D =
Array.new
opts.each do |opt, arg|
- if ["--to", =
"--config", "--from"].include?(opt)
+ if ["--to", =
"--config", "--from", =
"--header"].include?(opt)
=
$passthoughArgs << opt << arg
end
if =
["--debug"].include?(opt)