From workmin at ccs.neu.edu Fri Sep 2 21:52:18 2005 From: workmin at ccs.neu.edu (Jon Rafkind) Date: Fri Sep 2 21:52:20 2005 Subject: [cvsspam-devel] mailx instead of sendmail Message-ID: <4318C992.6090704@ccs.neu.edu> Hello, I found cvsspam today and am very excited to use it but I am running into problems with the generated email. I am forced to use mailx on my system at work and cannot figure out for the life of me how to set the Content-type to text/html. When I send a mail to myself from my UNIX account, it goes to the microsoft exchange server and then I can read it from outlook. The email from cvs commit always comes out as plain text, but I would like it in text/html so I can read the output of cvsspam as a webpage, of course. Does anyone know how to do this? Also I had to hack the source( cvsspam.rb ) a little bit to not send sendmail arguments to the $sendmail_prog command. Could mailx be supported in the future? From dave at badgers-in-foil.co.uk Sat Sep 3 13:35:38 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sat Sep 3 13:35:41 2005 Subject: [cvsspam-devel] mailx instead of sendmail In-Reply-To: <4318C992.6090704@ccs.neu.edu> References: <4318C992.6090704@ccs.neu.edu> Message-ID: <20050903133537.GB26010@badgers-in-foil.co.uk> Hi there! On Fri, Sep 02, 2005 at 05:52:18PM -0400, Jon Rafkind wrote: > I found cvsspam today and am very excited to use it but I am running > into problems with the generated email. I am forced to use mailx on my > system at work and cannot figure out for the life of me how to set the > Content-type to text/html. When I send a mail to myself from my UNIX > account, it goes to the microsoft exchange server and then I can read it > from outlook. The email from cvs commit always comes out as plain text, > but I would like it in text/html so I can read the output of cvsspam as > a webpage, of course. > > Does anyone know how to do this? Also I had to hack the source( > cvsspam.rb ) a little bit to not send sendmail arguments to the > $sendmail_prog command. Could mailx be supported in the future? I don't know mailx. A quick google produced a reference which includes an option to define an internal variable:- sendmail=shell-command Alternative command for delivering messages. The default is implementation-dependent. (LEGACY) suggesting that under the hood, maybe mailx uses some other, sendmail-like program to actually perform delivery. If that's true, can you could use that other program instead? If you simply can't find a program that allows you to inject a message with Content-Type/Mime-Version headers into the local mail queue, you could resort to attempting to dispatch the message using SMTP:- http://www.badgers-in-foil.co.uk/projects/cvsspam/cvsspam-doc.html#AEN101 Any good? dave -- http://david.holroyd.me.uk/ From jonathan.rafkind at citigroup.com Wed Sep 7 13:24:02 2005 From: jonathan.rafkind at citigroup.com (Rafkind, Jonathan [IT]) Date: Wed Sep 7 13:25:48 2005 Subject: [cvsspam-devel] Show submodule in message Message-ID: <9BD5776ED7344C4AA6AE50285E77A1E3037CE255@exchny41.ny.ssmb.com> Hello, Is there a way to get the CVS sub-module to be shown in the subject of the email produced by cvsspam? Right now I have a message like [ CVS foo ] Some message But I want [ CVS foo/bar ] Some message thanks, jon From dave at badgers-in-foil.co.uk Fri Sep 9 09:59:12 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Fri Sep 9 09:59:18 2005 Subject: [cvsspam-devel] Show submodule in message In-Reply-To: <9BD5776ED7344C4AA6AE50285E77A1E3037CE255@exchny41.ny.ssmb.com> References: <9BD5776ED7344C4AA6AE50285E77A1E3037CE255@exchny41.ny.ssmb.com> Message-ID: <20050909095912.GA22895@badgers-in-foil.co.uk> Hi there, On Wed, Sep 07, 2005 at 09:24:02AM -0400, Rafkind, Jonathan [IT] wrote: > Is there a way to get the CVS sub-module to be shown in the > subject of the email produced by cvsspam? Right now I have a message > like > > [ CVS foo ] Some message > > But I want > > [ CVS foo/bar ] Some message Well, unfortunately, there's no configration option to do this. If you want to hack your local copy of CVSspam to make this happen, you'll need to change the class method get(), of the class Repository, in cvsspam.rb Currently, the definition is: # gets the Repository object for the first component of the given path def Repository.get(name) # Leading './' is ignored (for peeps who have done 'cvs checkout .') # Trailing '/' ensures no match for files in root (we just want # dirs) name =~ /^(?:\.\/)?([^\/]+)\// name = $1 name = "/" if name.nil? # file at top-level? fake up a name for repo rep = @@repositories[name] if rep.nil? rep = Repository.new(name) @@repositories[name] = rep end rep end you should be able to get the effect you want by changing the regexp to something like, name =~ /^(?:\.\/)?([^\/]+(?:\/[^\/]+)?)\// This will have the effect that CVSspam will treat the first+second levels of the folder structure as defining seperate 'modules', rather than just the top level directory alone. CVSspam should be able to handle commits that touch more than one 'module' at once. For an example of a multi-module commit, see, http://www.badgers-in-foil.co.uk/projects/cvsspam/example.html [In that message 'testproject' and 'anotherproject' are top level directories in the repository.] I hope that works. I've not get the time to test that properly right now, so it would be great to hear the result, one way or the other. dave -- http://david.holroyd.me.uk/ From jonathan.rafkind at citigroup.com Fri Sep 9 16:09:13 2005 From: jonathan.rafkind at citigroup.com (Rafkind, Jonathan [IT]) Date: Fri Sep 9 16:12:29 2005 Subject: [cvsspam-devel] Show submodule in message Message-ID: <9BD5776ED7344C4AA6AE50285E77A1E309665605@exchny41.ny.ssmb.com> Outlook is horrible so I have to put the reply up here.. I used your regex for the name variable in the get() method verbatim and it worked fine. I now see email messages like [ CVS foo/bar ] Message When a commit is done in the foo module and bar submodule. Thanks for your help! -----Original Message----- From: cvsspam-devel-bounces@lists.badgers-in-foil.co.uk [mailto:cvsspam-devel-bounces@lists.badgers-in-foil.co.uk]On Behalf Of David Holroyd Sent: Friday, September 09, 2005 5:59 AM To: cvsspam-devel@lists.badgers-in-foil.co.uk Subject: Re: [cvsspam-devel] Show submodule in message Hi there, On Wed, Sep 07, 2005 at 09:24:02AM -0400, Rafkind, Jonathan [IT] wrote: > Is there a way to get the CVS sub-module to be shown in the > subject of the email produced by cvsspam? Right now I have a message > like > > [ CVS foo ] Some message > > But I want > > [ CVS foo/bar ] Some message Well, unfortunately, there's no configration option to do this. If you want to hack your local copy of CVSspam to make this happen, you'll need to change the class method get(), of the class Repository, in cvsspam.rb Currently, the definition is: # gets the Repository object for the first component of the given path def Repository.get(name) # Leading './' is ignored (for peeps who have done 'cvs checkout .') # Trailing '/' ensures no match for files in root (we just want # dirs) name =~ /^(?:\.\/)?([^\/]+)\// name = $1 name = "/" if name.nil? # file at top-level? fake up a name for repo rep = @@repositories[name] if rep.nil? rep = Repository.new(name) @@repositories[name] = rep end rep end you should be able to get the effect you want by changing the regexp to something like, name =~ /^(?:\.\/)?([^\/]+(?:\/[^\/]+)?)\// This will have the effect that CVSspam will treat the first+second levels of the folder structure as defining seperate 'modules', rather than just the top level directory alone. CVSspam should be able to handle commits that touch more than one 'module' at once. For an example of a multi-module commit, see, http://www.badgers-in-foil.co.uk/projects/cvsspam/example.html [In that message 'testproject' and 'anotherproject' are top level directories in the repository.] I hope that works. I've not get the time to test that properly right now, so it would be great to hear the result, one way or the other. dave -- http://david.holroyd.me.uk/ _______________________________________________ cvsspam-devel mailing list cvsspam-devel@lists.badgers-in-foil.co.uk http://lists.badgers-in-foil.co.uk/mailman/listinfo/cvsspam-devel From jonathan.rafkind at citigroup.com Mon Sep 19 21:07:25 2005 From: jonathan.rafkind at citigroup.com (Rafkind, Jonathan [IT]) Date: Mon Sep 19 21:09:26 2005 Subject: [cvsspam-devel] Concurrent commits breaks CVSSpam Message-ID: <9BD5776ED7344C4AA6AE50285E77A1E309665648@exchny41.ny.ssmb.com> Hi, I have a problem when two users commit at near the same time with CVSSpam running. Given the following situation: User A commits While A's commit is being processed by CVS user B commits User B's commit ends before user A's and so CVSSpam erases the directory in /tmp/#cvsspam.whatever User A's commit finishes but /tmp/#cvsspam.whatever is gone so no log message is generated. I assume the workaround for this was that the /tmp/#cvsspam.whatever directory was supposed to be read/write only by the user who did the commit but in my case cvs is owned by a special single user, so all /tmp/#cvsspam.whatever directories are available for modification by CVSSpam. Is there some other way to make CVSSpam recognize who made a commit and not to touch if it shouldnt? From alphasnd at gmail.com Wed Sep 21 17:24:24 2005 From: alphasnd at gmail.com (Fred) Date: Wed Sep 21 20:37:57 2005 Subject: [cvsspam-devel] fix to collect_diff.rb Message-ID: <9eab737c0509211024571d2856@mail.gmail.com> Hello, I'm running cvsspam on a linux box (debian) but i got some problem when perfoming the 'diff' with cvsspam. Somewhat the second version argument contained a newline for some files (not all, and it seemed very random). Here is what i got when i enbaled the --debug flag: collect_diffs.rb: CVSROOT is /home/cvs/xxxxx collect_diffs.rb: ARGV is , <1.15>, <1.16 > collect_diffs.rb: 1.16 collect_diffs.rb: about to run cvs -nq diff -Nu -r1.15 -r1.16 BuildAll.bat cvs [diff aborted]: Numeric tag 1.16 contains characters other than digits and '.' collect_diffs.rb: sending spam. (I am /home/cvs/cvsspam/collect_diffs.rb) cvsspam.rb: Using config '/home/cvs/xxxxxx/CVSROOT/cvsspam.conf' cvsspam.rb: invoking '/usr/sbin/sendmail -t -oi' cvsspam.rb: Mail From not set cvsspam.rb: leaving file /tmp/#cvsspam.4633.1000-85846936/logfile.emailtmp collect_diffs.rb: leaving file /tmp/#cvsspam.4633.1000-85846936/logfile The newline after the 1.16 is really present, it's not a mail issue :). So to fix this, i just added a .strip to the line which build the cvs diff: diff_cmd << "-D1/26/1977" << "-r#{change.toVer.strip}" and diff_cmd << "-r#{change.fromVer}" << "-r#{change.toVer.strip}" I spend some times on it, so i tough it could be useful to other people. That's why i post it. This changes shouldn't affect other stuffs. Whith this all is working nicely :). -- Best regards, Fred. From dave at badgers-in-foil.co.uk Wed Sep 21 21:02:39 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Wed Sep 21 21:02:43 2005 Subject: [cvsspam-devel] Concurrent commits breaks CVSSpam In-Reply-To: <9BD5776ED7344C4AA6AE50285E77A1E309665648@exchny41.ny.ssmb.com> References: <9BD5776ED7344C4AA6AE50285E77A1E309665648@exchny41.ny.ssmb.com> Message-ID: <20050921210238.GB2190@badgers-in-foil.co.uk> Hi, sorry for the late reply -- just back from hols... On Mon, Sep 19, 2005 at 05:07:25PM -0400, Rafkind, Jonathan [IT] wrote: > I have a problem when two users commit at near the same time > with CVSSpam running. Given the following situation: > User A commits > While A's commit is being processed by CVS user B commits > User B's commit ends before user A's and so CVSSpam erases the > directory in /tmp/#cvsspam.whatever > User A's commit finishes but /tmp/#cvsspam.whatever is gone so no log > message is generated. > > I assume the workaround for this was that the /tmp/#cvsspam.whatever > directory was supposed to be read/write only by the user who did the > commit but in my case cvs is owned by a special single user, so all > /tmp/#cvsspam.whatever directories are available for modification by > CVSSpam. > > Is there some other way to make CVSSpam recognize who made a commit > and not to touch if it shouldnt? CVSspam isn't able to handle this at the moment. In your CVS config, are users issued with seperate CVS logins which are aliased to a single Unix login, or is there actually only a single CVS login too? It may be possible to have the tmp dir name include the CVS 'USER' in its name to work around the case you identify. However, I think it's impossible to deal with the case where two commits identified by a single CVS user collide -- the architecture of CVS does not allow us to do that _and_ to collate all the info describing a commit into a single email. dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Wed Sep 21 21:23:09 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Wed Sep 21 21:23:13 2005 Subject: [cvsspam-devel] fix to collect_diff.rb In-Reply-To: <9eab737c0509211024571d2856@mail.gmail.com> References: <9eab737c0509211024571d2856@mail.gmail.com> Message-ID: <20050921212308.GC2190@badgers-in-foil.co.uk> On Wed, Sep 21, 2005 at 07:24:24PM +0200, Fred wrote: > Hello, > > I'm running cvsspam on a linux box (debian) but i got some problem > when perfoming the 'diff' with cvsspam. Somewhat the second version > argument contained a newline for some files (not all, and it seemed > very random). Here is what i got when i enbaled the --debug flag: > > collect_diffs.rb: CVSROOT is /home/cvs/xxxxx > collect_diffs.rb: ARGV is , <1.15>, <1.16 > > > collect_diffs.rb: 1.16 > collect_diffs.rb: about to run cvs -nq diff -Nu -r1.15 -r1.16 > BuildAll.bat > cvs [diff aborted]: Numeric tag 1.16 > contains characters other than digits and '.' > collect_diffs.rb: sending spam. (I am /home/cvs/cvsspam/collect_diffs.rb) > cvsspam.rb: Using config '/home/cvs/xxxxxx/CVSROOT/cvsspam.conf' > cvsspam.rb: invoking '/usr/sbin/sendmail -t -oi' > cvsspam.rb: Mail From not set > cvsspam.rb: leaving file /tmp/#cvsspam.4633.1000-85846936/logfile.emailtmp > collect_diffs.rb: leaving file /tmp/#cvsspam.4633.1000-85846936/logfile That's odd. I don't think that CVSspam alters these values after they're passed from the calling CVS process. I don't suppose you've got something 'funny' in your loginfo format-string, have you? > The newline after the 1.16 is really present, it's not a mail issue > :). So to fix this, i just added a .strip to the line which build the > cvs diff: Many thanks for spending the effort to find the problem and providing a solution! I've prepared the following patch which does the same fix, but for all uses of this value (not just the diff that was breaking). If, after further inspection, it doesn't turn out to be an issue with your config, I'll be including this in the next version ta, dave -- http://david.holroyd.me.uk/ -------------- next part -------------- Index: collect_diffs.rb =================================================================== RCS file: /var/lib/cvs/cvsspam/collect_diffs.rb,v retrieving revision 1.25 diff -u -r1.25 collect_diffs.rb --- collect_diffs.rb 27 Feb 2005 22:04:52 -0000 1.25 +++ collect_diffs.rb 21 Sep 2005 21:06:43 -0000 @@ -129,7 +129,14 @@ changes = Array.new i = 0 while i < cvs_info.length - changes << ChangeInfo.new(cvs_info[i], cvs_info[i+=1], cvs_info[i+=1]) + change_file = cvs_info[i] + # It's been reported, + # http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/2005-September/000380.html + # that sometimes the second revision number that CVS gives us contains a + # trailing newline character, so we strip ws from these values before use, + change_from = cvs_info[i+=1].strip + change_to = cvs_info[i+=1].strip + changes << ChangeInfo.new(change_file, change_from, change_to) i+=1 end return changes From jonathan.rafkind at citigroup.com Wed Sep 21 21:38:10 2005 From: jonathan.rafkind at citigroup.com (Rafkind, Jonathan [IT]) Date: Wed Sep 21 21:42:32 2005 Subject: [cvsspam-devel] Concurrent commits breaks CVSSpam Message-ID: <9BD5776ED7344C4AA6AE50285E77A1E309665669@exchny41.ny.ssmb.com> Sorry for replying on top. I changed $dirtemplate to include the user name by changing my commitinfo to ^Project $CVSROOT/CVSROOT/record_lastdir.rb --from $USER and added option parsing to record_lastdir.rb to set a $from_address variable. The $dirtemplate in record_lastdir.rb and collect_diffs.rb is: $dirtemplate = "#cvsspam.#{Process.getpgrp}.#{Process.uid}.#{$from_address}" This works, so Im happy. My cvsspam ruby files are kind of hacked up and im sure you can figure this stuff out for yourself but if you want I can send you my files for inclusion in the next release of CVSSpam. Do you think its a worthwhile to include in the mainstream product? -----Original Message----- From: cvsspam-devel-bounces@lists.badgers-in-foil.co.uk [mailto:cvsspam-devel-bounces@lists.badgers-in-foil.co.uk]On Behalf Of David Holroyd Sent: Wednesday, September 21, 2005 5:03 PM To: cvsspam-devel@lists.badgers-in-foil.co.uk Subject: Re: [cvsspam-devel] Concurrent commits breaks CVSSpam Hi, sorry for the late reply -- just back from hols... On Mon, Sep 19, 2005 at 05:07:25PM -0400, Rafkind, Jonathan [IT] wrote: > I have a problem when two users commit at near the same time > with CVSSpam running. Given the following situation: > User A commits > While A's commit is being processed by CVS user B commits > User B's commit ends before user A's and so CVSSpam erases the > directory in /tmp/#cvsspam.whatever > User A's commit finishes but /tmp/#cvsspam.whatever is gone so no log > message is generated. > > I assume the workaround for this was that the /tmp/#cvsspam.whatever > directory was supposed to be read/write only by the user who did the > commit but in my case cvs is owned by a special single user, so all > /tmp/#cvsspam.whatever directories are available for modification by > CVSSpam. > > Is there some other way to make CVSSpam recognize who made a commit > and not to touch if it shouldnt? CVSspam isn't able to handle this at the moment. In your CVS config, are users issued with seperate CVS logins which are aliased to a single Unix login, or is there actually only a single CVS login too? It may be possible to have the tmp dir name include the CVS 'USER' in its name to work around the case you identify. However, I think it's impossible to deal with the case where two commits identified by a single CVS user collide -- the architecture of CVS does not allow us to do that _and_ to collate all the info describing a commit into a single email. dave -- http://david.holroyd.me.uk/ _______________________________________________ cvsspam-devel mailing list cvsspam-devel@lists.badgers-in-foil.co.uk http://lists.badgers-in-foil.co.uk/mailman/listinfo/cvsspam-devel From alphasnd at gmail.com Wed Sep 21 21:40:33 2005 From: alphasnd at gmail.com (Fred) Date: Wed Sep 21 21:50:29 2005 Subject: [cvsspam-devel] fix to collect_diff.rb In-Reply-To: <20050921212308.GC2190@badgers-in-foil.co.uk> References: <9eab737c0509211024571d2856@mail.gmail.com> <20050921212308.GC2190@badgers-in-foil.co.uk> Message-ID: <9eab737c05092114403082c6d5@mail.gmail.com> Hello, > That's odd. I don't think that CVSspam alters these values after > they're passed from the calling CVS process. I don't suppose you've got > something 'funny' in your loginfo format-string, have you? I don't think, it's the following line: DEFAULT /home/cvs/cvsspam/collect_diffs.rb --to alphasnd@gmail.com %{sVv} > Many thanks for spending the effort to find the problem and providing a > solution! I've prepared the following patch which does the same fix, > but for all uses of this value (not just the diff that was breaking). > > If, after further inspection, it doesn't turn out to be an issue with > your config, I'll be including this in the next version Thank you for the real fix, i'm not familiar with ruby (it's my first hack in it to be honnest). I applied your patch and it seems to work as expected, great ! If something goes wrong i will post a new message here. -- Best regards, Fred. From glen at starretthome.net Thu Sep 22 04:25:26 2005 From: glen at starretthome.net (Glen Starrett) Date: Thu Sep 22 04:26:40 2005 Subject: [cvsspam-devel] Concurrent commits breaks CVSSpam In-Reply-To: <20050921210238.GB2190@badgers-in-foil.co.uk> References: <9BD5776ED7344C4AA6AE50285E77A1E309665648@exchny41.ny.ssmb.com> <20050921210238.GB2190@badgers-in-foil.co.uk> Message-ID: <43323236.20108@starretthome.net> David Holroyd wrote: >It may be possible to have the tmp dir name include the CVS 'USER' in >its name to work around the case you identify. However, I think it's >impossible to deal with the case where two commits identified by a >single CVS user collide -- the architecture of CVS does not allow us to >do that _and_ to collate all the info describing a commit into a single >email. > > I think other CVS scripts use the process ID of the CVS thread(?) for that particular item. Might work for CVSSpam, but I saw this particular example I'm thinking of on Win32. Glen Starrett From taintedham-mailinglists at yahoo.com Thu Sep 22 03:19:20 2005 From: taintedham-mailinglists at yahoo.com (taintedham-mailinglists@yahoo.com) Date: Thu Sep 22 11:13:49 2005 Subject: [cvsspam-devel] Subversion support? Message-ID: <20050922031920.94982.qmail@web52505.mail.yahoo.com> I've been using CVSSpam for some time with CVS. I love it. Though I've been using SVN lately because of the Dav support and other things. Would it be real hard to add support for SVN? I could help write the code to make it work. Any ideas on how we'd go about doing it? Thanks, Dave Horner From dave at badgers-in-foil.co.uk Thu Sep 22 12:37:48 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu Sep 22 12:37:57 2005 Subject: [cvsspam-devel] Concurrent commits breaks CVSSpam In-Reply-To: <43323236.20108@starretthome.net> References: <9BD5776ED7344C4AA6AE50285E77A1E309665648@exchny41.ny.ssmb.com> <20050921210238.GB2190@badgers-in-foil.co.uk> <43323236.20108@starretthome.net> Message-ID: <20050922123748.GA11162@badgers-in-foil.co.uk> On Wed, Sep 21, 2005 at 09:25:26PM -0700, Glen Starrett wrote: > David Holroyd wrote: > >It may be possible to have the tmp dir name include the CVS 'USER' in > >its name to work around the case you identify. However, I think it's > >impossible to deal with the case where two commits identified by a > >single CVS user collide -- the architecture of CVS does not allow us to > >do that _and_ to collate all the info describing a commit into a single > >email. > > I think other CVS scripts use the process ID of the CVS thread(?) for > that particular item. Might work for CVSSpam, but I saw this particular > example I'm thinking of on Win32. CVSspam does include the process group id in the 'pseudo unique' directory name in an attempt to avoid collisions. I think this works (i.e. collisions are avoided) in some configurations, but not in others. I no longer remember how each of the ways of invoking CVS (local / via inetd / etc.) differ in their effect on the process group id as perceived by the hook script. I seem to recall from waaaay back when I originally hacked this scheme together that it's not possible to use the parent process id to group things... dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Thu Sep 22 12:42:50 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu Sep 22 12:42:53 2005 Subject: [cvsspam-devel] Concurrent commits breaks CVSSpam In-Reply-To: <9BD5776ED7344C4AA6AE50285E77A1E309665669@exchny41.ny.ssmb.com> References: <9BD5776ED7344C4AA6AE50285E77A1E309665669@exchny41.ny.ssmb.com> Message-ID: <20050922124249.GB11162@badgers-in-foil.co.uk> On Wed, Sep 21, 2005 at 05:38:10PM -0400, Rafkind, Jonathan [IT] wrote: > Sorry for replying on top. > > I changed $dirtemplate to include the user name by changing my commitinfo to > > ^Project $CVSROOT/CVSROOT/record_lastdir.rb --from $USER > > and added option parsing to record_lastdir.rb to set a $from_address variable. The $dirtemplate in record_lastdir.rb and collect_diffs.rb is: > > $dirtemplate = "#cvsspam.#{Process.getpgrp}.#{Process.uid}.#{$from_address}" > > This works, so Im happy. My cvsspam ruby files are kind of hacked up > and im sure you can figure this stuff out for yourself but if you want > I can send you my files for inclusion in the next release of CVSSpam. > Do you think its a worthwhile to include in the mainstream product? Yeah, if you could send me your copies (or better yet, a diff -u), I'll have a think about the best way of including this in the next release (we need to avoid breaking things for people upgrading who are already using the --from option in loginfo, but not yet in commitinfo). thanks for all the help with this! dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Thu Sep 22 12:52:22 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu Sep 22 12:52:23 2005 Subject: [cvsspam-devel] Subversion support? In-Reply-To: <20050922031920.94982.qmail@web52505.mail.yahoo.com> References: <20050922031920.94982.qmail@web52505.mail.yahoo.com> Message-ID: <20050922125222.GC11162@badgers-in-foil.co.uk> Hi there, On Wed, Sep 21, 2005 at 08:19:20PM -0700, taintedham-mailinglists@yahoo.com wrote: > I've been using CVSSpam for some time with CVS. I > love it. Though I've been using SVN lately because of > the Dav support and other things. > > Would it be real hard to add support for SVN? I could > help write the code to make it work. Any ideas on how > we'd go about doing it? Actually, a few months ago, I hacked together some glue to join a new SVN front-end hook onto the existing cvsspam.rb (the email-generating component of the CVSspam scripts). It's probably very fragile and only handles the subset of SVN functionality that it has in common with CVS (i.e. I've actually been avoiding doing moves / copies in that repositry :-S ) I will try to cvs2svn the CVSspam repository and make it public some time soon... dave -- http://david.holroyd.me.uk/ From jonathan.rafkind at citigroup.com Thu Sep 22 13:34:48 2005 From: jonathan.rafkind at citigroup.com (Rafkind, Jonathan [IT]) Date: Thu Sep 22 13:35:51 2005 Subject: [cvsspam-devel] Concurrent commits breaks CVSSpam Message-ID: <9BD5776ED7344C4AA6AE50285E77A1E30966566B@exchny41.ny.ssmb.com> This is diff'd to version 0.2.12. I cant get CVS while at work. Ignore the stuff about setting cvsroot_dir. --- record_lastdir.rb 2005-09-02 14:22:55.747206000 -0400 +++ /home/jr53896/checkout/CVSROOT/record_lastdir.rb 2005-09-22 09:32:23.641031000 -0400 @@ -4,12 +4,22 @@ # http://www.badgers-in-foil.co.uk/projects/cvsspam/ # Copyright (c) David Holroyd +require 'getoptlong' + +opts = GetoptLong.new( + [ "--from", "-u", GetoptLong::REQUIRED_ARGUMENT ] +) + +opts.each do |opt, arg| + $from_address = arg if opt=="--from" +end + $repositorydir = ARGV.shift $tmpdir = ENV["TMPDIR"] || "/tmp" # try to pick a name to avoid collisions with other people's commits -$dirtemplate = "#cvsspam.#{Process.getpgrp}.#{Process.uid}" +$dirtemplate = "#cvsspam.#{Process.getpgrp}.#{Process.uid}.#{$from_address}" def find_data_dir Dir["#{$tmpdir}/#{$dirtemplate}-*"].each do |dir| --- collect_diffs.rb 2005-09-02 14:22:27.537440000 -0400 +++ /home/jr53896/checkout/CVSROOT/collect_diffs.rb 2005-09-21 17:23:43.521573000 -0400 @@ -24,10 +24,14 @@ $tmpdir = ENV["TMPDIR"] || "/tmp" -$dirtemplate = "#cvsspam.#{Process.getpgrp}.#{Process.uid}" + +def getDirTemplate + return "#cvsspam.#{Process.getpgrp}.#{Process.uid}.#{$from_address}" +end +# $dirtemplate = "#cvsspam.#{Process.getpgrp}.#{Process.uid}.#{$from_address}" def find_data_dir - Dir["#{$tmpdir}/#{$dirtemplate}-*"].each do |dir| + Dir["#{$tmpdir}/#{getDirTemplate()}-*"].each do |dir| stat = File.stat(dir) return dir if stat.owned? end @@ -145,7 +149,7 @@ $datadir = find_data_dir() - raise "missing data dir (#{$tmpdir}/#{$dirtemplate}-XXXXXX)" if $datadir==nil + raise "missing data dir (#{$tmpdir}/#{getDirTemplate()}-XXXXXX)" if $datadir==nil line = $stdin.gets unless line =~ /^Update of (.+)/ @@ -385,6 +389,7 @@ if ["--debug"].include?(opt) $passthroughArgs << opt end + $from_address = arg if opt=="--from" $config = arg if opt=="--config" $debug = true if opt == "--debug" end @@ -394,6 +399,8 @@ cvsroot_dir = "#{ENV['CVSROOT']}/CVSROOT" +cvsroot_dir = "/opt/alfdev/cvsspam" + if $config == nil if FileTest.exists?("#{cvsroot_dir}/cvsspam.conf") $config = "#{cvsroot_dir}/cvsspam.conf" -----Original Message----- From: cvsspam-devel-bounces@lists.badgers-in-foil.co.uk [mailto:cvsspam-devel-bounces@lists.badgers-in-foil.co.uk]On Behalf Of David Holroyd Sent: Thursday, September 22, 2005 8:43 AM To: cvsspam-devel@lists.badgers-in-foil.co.uk Subject: Re: [cvsspam-devel] Concurrent commits breaks CVSSpam On Wed, Sep 21, 2005 at 05:38:10PM -0400, Rafkind, Jonathan [IT] wrote: > Sorry for replying on top. > > I changed $dirtemplate to include the user name by changing my commitinfo to > > ^Project $CVSROOT/CVSROOT/record_lastdir.rb --from $USER > > and added option parsing to record_lastdir.rb to set a $from_address variable. The $dirtemplate in record_lastdir.rb and collect_diffs.rb is: > > $dirtemplate = "#cvsspam.#{Process.getpgrp}.#{Process.uid}.#{$from_address}" > > This works, so Im happy. My cvsspam ruby files are kind of hacked up > and im sure you can figure this stuff out for yourself but if you want > I can send you my files for inclusion in the next release of CVSSpam. > Do you think its a worthwhile to include in the mainstream product? Yeah, if you could send me your copies (or better yet, a diff -u), I'll have a think about the best way of including this in the next release (we need to avoid breaking things for people upgrading who are already using the --from option in loginfo, but not yet in commitinfo). thanks for all the help with this! dave -- http://david.holroyd.me.uk/ _______________________________________________ cvsspam-devel mailing list cvsspam-devel@lists.badgers-in-foil.co.uk http://lists.badgers-in-foil.co.uk/mailman/listinfo/cvsspam-devel From radoeka at xs4all.nl Thu Sep 22 19:31:54 2005 From: radoeka at xs4all.nl (Richard Bos) Date: Thu Sep 22 19:30:29 2005 Subject: [cvsspam-devel] Subversion support? In-Reply-To: <20050922125222.GC11162@badgers-in-foil.co.uk> References: <20050922031920.94982.qmail@web52505.mail.yahoo.com> <20050922125222.GC11162@badgers-in-foil.co.uk> Message-ID: <200509222131.55219.radoeka@xs4all.nl> Op donderdag 22 september 2005 14:52, schreef David Holroyd: > On Wed, Sep 21, 2005 at 08:19:20PM -0700, taintedham-mailinglists@yahoo.com wrote: > > I've been using CVSSpam for some time with CVS. ?I > > love it. ?Though I've been using SVN lately because of > > the Dav support and other things. > > > > Would it be real hard to add support for SVN? ?I could > > help write the code to make it work. ?Any ideas on how > > we'd go about doing it? I asked the same question to myself yesterday too! That makes 2 of us. > Actually, a few months ago, I hacked together some glue to join a new > SVN front-end hook onto the existing cvsspam.rb (the email-generating > component of the CVSspam scripts). > > It's probably very fragile and only handles the subset of SVN > functionality that it has in common with CVS (i.e. I've actually been > avoiding doing moves / copies in that repositry :-S ) > > I will try to cvs2svn the CVSspam repository and make it public some > time soon... What about your more than an 1 year effort ago: http://lists.badgers-in-foil.co.uk/pipermail/svnspam-dev/2004-May/thread.html What about SVN::Notify it seems similar to cvsspam: http://search.cpan.org/~dwheeler/SVN-Notify-2.48/ -- Richard Bos Without a home the journey is endless -- Richard Bos Without a home the journey is endless From dave at badgers-in-foil.co.uk Thu Sep 22 22:44:42 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu Sep 22 22:44:48 2005 Subject: [cvsspam-devel] Public access to CVSspam code repository Message-ID: <20050922224442.GA19665@badgers-in-foil.co.uk> The CVSspam source code is now publicly available, via Subversion ;) To get the very latest version of the codebase, mkdir cvsspam; cd cvsspam svn co http://svn.badgers-in-foil.co.uk/cvsspam/trunk/ The SVN repository was just created from the private CVS repository which has been hosting the code until now. I hope I did the cvs2svn correctly. dave ---- Fun Fact: before this Ruby implementation, there was Perl as far as the eye could see! http://cvs.sourceforge.net/viewcvs.py/flight/CVSROOT/commitmail.pl?rev=1.1&view=auto ---- -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Thu Sep 22 23:04:55 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu Sep 22 23:05:00 2005 Subject: [cvsspam-devel] Subversion support? In-Reply-To: <20050922125222.GC11162@badgers-in-foil.co.uk> References: <20050922031920.94982.qmail@web52505.mail.yahoo.com> <20050922125222.GC11162@badgers-in-foil.co.uk> Message-ID: <20050922230455.GA20015@badgers-in-foil.co.uk> On Thu, Sep 22, 2005 at 12:52:22PM +0000, David Holroyd wrote: > Hi there, > > On Wed, Sep 21, 2005 at 08:19:20PM -0700, taintedham-mailinglists@yahoo.com wrote: > > Would it be real hard to add support for SVN? I could > > help write the code to make it work. Any ideas on how > > we'd go about doing it? > I will try to cvs2svn the CVSspam repository and make it public some > time soon... I've done this, and have created a branch for development of SVN support. If you check out, http://svn.badgers-in-foil.co.uk/cvsspam/branches/svn_support/ You will (at time of writing) get the same files as are available on the trunk, but with the addition of 'svn_post_commit_hook.rb'. For the moment, working out how to use this is left as an excercise for the reader. NOTE: This code is unfinished! It will eat your pets, etc. ta, dave -- http://david.holroyd.me.uk/ From richard at radoeka.nl Fri Sep 23 19:25:12 2005 From: richard at radoeka.nl (Richard Bos) Date: Sat Sep 24 13:22:32 2005 Subject: [cvsspam-devel] Subversion support? In-Reply-To: <200509222131.55219.radoeka@xs4all.nl> References: <20050922031920.94982.qmail@web52505.mail.yahoo.com> <20050922125222.GC11162@badgers-in-foil.co.uk> <200509222131.55219.radoeka@xs4all.nl> Message-ID: <200509232125.13482.richard@radoeka.nl> Op donderdag 22 september 2005 21:31, schreef Richard Bos: > What about SVN::Notify it seems similar to cvsspam: > http://search.cpan.org/~dwheeler/SVN-Notify-2.48/ I played with it today, but it does not provide the same nice looking html output compared to cvsspam. What I miss as well is the possility to sent email to a group depending on the module name. -- Richard Bos Without a home the journey is endless From pardinilist at pardini.net Tue Sep 27 02:51:29 2005 From: pardinilist at pardini.net (Ricardo Pardini) Date: Tue Sep 27 06:43:11 2005 Subject: [cvsspam-devel] Subversion support? In-Reply-To: <200509232125.13482.richard@radoeka.nl> References: <20050922031920.94982.qmail@web52505.mail.yahoo.com> <20050922125222.GC11162@badgers-in-foil.co.uk> <200509222131.55219.radoeka@xs4all.nl> <200509232125.13482.richard@radoeka.nl> Message-ID: <4338B3B1.9070801@pardini.net> Richard Bos wrote: >> What about SVN::Notify it seems similar to cvsspam: >> http://search.cpan.org/~dwheeler/SVN-Notify-2.48/ >> > I played with it today, but it does not provide the same nice looking html > output compared to cvsspam. What I miss as well is the possility to sent > email to a group depending on the module name. > There is no 'module' concept in Subversion. I usually work around this by making multiple SVN repositories (each repository has a post-commit hook, which allows for different invocations of SVN::Notify or CVSpam). You could probably hack into SVN::Notify/CVSSpam so it can distinguish 'module' (first directory under the repository) and act differently, even though I wouldn't do that. I think SVN::Notify is a great program, even though it IS written in Perl. I will soon test CVSSpam (now hosted on Subversion, which must mean something!, great work David) with a test SVN repository. I wonder how it will react to copies and moves? All the best. -- Pardini -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3172 bytes Desc: S/MIME Cryptographic Signature Url : http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/attachments/20050926/edd25ddc/smime.bin From dave at badgers-in-foil.co.uk Tue Sep 27 09:15:30 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Tue Sep 27 09:15:36 2005 Subject: [cvsspam-devel] Subversion support? In-Reply-To: <4338B3B1.9070801@pardini.net> References: <20050922031920.94982.qmail@web52505.mail.yahoo.com> <20050922125222.GC11162@badgers-in-foil.co.uk> <200509222131.55219.radoeka@xs4all.nl> <200509232125.13482.richard@radoeka.nl> <4338B3B1.9070801@pardini.net> Message-ID: <20050927091530.GA21825@badgers-in-foil.co.uk> Hi there, On Mon, Sep 26, 2005 at 11:51:29PM -0300, Ricardo Pardini wrote: > Richard Bos wrote: > >>What about SVN::Notify it seems similar to cvsspam: > >>http://search.cpan.org/~dwheeler/SVN-Notify-2.48/ > >> > >I played with it today, but it does not provide the same nice looking html > >output compared to cvsspam. What I miss as well is the possility to sent > >email to a group depending on the module name. The formatting is _fairly_ close though... http://www.justatheory.com/computers/programming/perl/modules/svnnotify-2.40_colordiff_example.html > There is no 'module' concept in Subversion. I usually work around this > by making multiple SVN repositories (each repository has a post-commit > hook, which allows for different invocations of SVN::Notify or CVSpam). > You could probably hack into SVN::Notify/CVSSpam so it can distinguish > 'module' (first directory under the repository) and act differently, > even though I wouldn't do that. This has been the organisation I've used for the repositories I've set up. It's had the (unforseen) advantage that when creating the CVSspam repo, I was able to use the new SVN1.1 fsfs format, while older repositories created with SVN1.0 remain in bdb format. > I think SVN::Notify is a great program, even though it IS written in Perl. > I will soon test CVSSpam (now hosted on Subversion, which must mean > something!, great work David) with a test SVN repository. > I wonder how it will react to copies and moves? The best possible outcome given the current state of the code is that copies will be missing from the CVSspam email, and moved files will have the deletion of the original listed, but not the arrival of the copy at its new destination. Alternatively, it may end up bleeding green blood all over your /tmp dir -- I'm just not sure. I'd advise only looking at the svn_support branch if you're interested in hacking on the codebase. I'd love to hear about it if you do ;) thanks, dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Tue Sep 27 09:40:28 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Tue Sep 27 09:40:33 2005 Subject: [cvsspam-devel] Subversion support? In-Reply-To: <20050927091530.GA21825@badgers-in-foil.co.uk> References: <20050922031920.94982.qmail@web52505.mail.yahoo.com> <20050922125222.GC11162@badgers-in-foil.co.uk> <200509222131.55219.radoeka@xs4all.nl> <200509232125.13482.richard@radoeka.nl> <4338B3B1.9070801@pardini.net> <20050927091530.GA21825@badgers-in-foil.co.uk> Message-ID: <20050927094028.GB21825@badgers-in-foil.co.uk> On Tue, Sep 27, 2005 at 09:15:30AM +0000, David Holroyd wrote: > I'd advise only looking at the svn_support branch if you're interested > in hacking on the codebase. I'd love to hear about it if you do ;) This reminded my that at some point, I wrote a test harness for the SVN code. Hunting around, I found the file in the backup of my laptop, and have now committed it to the svn_support branch: http://svn.badgers-in-foil.co.uk/cvsspam/branches/svn_support/svntestcases/test.rb With this, you can say, ruby -w test.rb your_email_address_here and should then receive a familiar-looking email. dave -- http://david.holroyd.me.uk/ From newslogic at gmail.com Wed Sep 28 06:31:12 2005 From: newslogic at gmail.com (Andy Crain) Date: Wed Sep 28 06:31:53 2005 Subject: [cvsspam-devel] strange error in collect_diffs.rb Message-ID: <438949c05092723312ef77ef9@mail.gmail.com> Hi, I'm attempting to install cvsspam and feel I'm nearly there, but I get an unusual error message now upon making a commit: /cvs/CVSROOT/collect_diffs.rb:116:in `collect_antique_style_args': ' ' doesn't match ' ,, ...' (RuntimeError) from /cvs/CVSROOT/collect_diffs.rb:166:in `process_log' from /cvs/CVSROOT/collect_diffs.rb:447 Something with figuring out the cvs version maybe? I don't know ruby and couldn't figure out the problem. Any ideas or help would be greatly appreciated. Andy From dave at badgers-in-foil.co.uk Wed Sep 28 09:49:22 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Wed Sep 28 09:49:29 2005 Subject: [cvsspam-devel] strange error in collect_diffs.rb In-Reply-To: <438949c05092723312ef77ef9@mail.gmail.com> References: <438949c05092723312ef77ef9@mail.gmail.com> Message-ID: <20050928094922.GA4465@badgers-in-foil.co.uk> Hi there, On Wed, Sep 28, 2005 at 02:31:12AM -0400, Andy Crain wrote: > I'm attempting to install cvsspam and feel I'm nearly there, but I get > an unusual error message now upon making a commit: > > /cvs/CVSROOT/collect_diffs.rb:116:in `collect_antique_style_args': ' > ' doesn't match ' ,, ...' (RuntimeError) > from /cvs/CVSROOT/collect_diffs.rb:166:in `process_log' > from /cvs/CVSROOT/collect_diffs.rb:447 Gar! Versions of CVS everywhere have started passing newline characters in the command line arguments to hook-scripts. This sounds very similar to the problem reported by Fred, over here: http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/2005-September/000380.html But, because you're using the pre-1.12.x 'format strings' in the config files, the fix is in a different code-path. Can you give it another go with the attached patch to collect_diffs.rb applied and let us know if it works? Also, could you tell me exactly what version of CVS you're using on the server? Thanks for reporting this issue! dave -- http://david.holroyd.me.uk/ -------------- next part -------------- Index: collect_diffs.rb =================================================================== --- collect_diffs.rb (revision 227) +++ collect_diffs.rb (working copy) @@ -98,6 +98,12 @@ # unambiguously, but we make an effort to get it right in as many cases as # possible. def collect_antique_style_args(cvs_info) + # it seems that some versions of CVS pass a trainling newline with the + # commandline, + # http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/2005-September/000398.html + # so strip surrounding whitespace from the string before use, + cvs_info.strip! + # remove leading slashes that may appear due to the user entering trailing # slashes in their CVSROOT specification cvs_info = cvs_info.sub(/^\/+/, "") @@ -113,7 +119,7 @@ # make a list of changed files given on the command line while version_info.length>0 if version_info.sub!(/^ (.+?),(NONE|[.0-9]+),(NONE|[.0-9]+)/, '') == nil - fail "'#{version_info}' doesn't match ' ,, ...'" + fail "#{version_info.inspect} doesn't match ' ,, ...'" end changes << ChangeInfo.new($1, $2, $3) end From jonathan.rafkind at citigroup.com Wed Sep 28 14:40:04 2005 From: jonathan.rafkind at citigroup.com (Rafkind, Jonathan [IT]) Date: Wed Sep 28 14:41:48 2005 Subject: [cvsspam-devel] Reducing the size of emails Message-ID: <9BD5776ED7344C4AA6AE50285E77A1E309665696@exchny41.ny.ssmb.com> CVSSpam is produces very large emails for some of my commits, some in excess of 1mb but never more than 2mb, I assume 2mb is the limit. I would like to limit this, I think 1mb is good for now. I assume its one of these variables, but which one is 'best' to edit and what should I change it to? --cvsspam.rb $maxSubjectLength = 200 $maxLinesPerDiff = 1000 $maxDiffLineLength = 1000 From dave at badgers-in-foil.co.uk Wed Sep 28 15:05:10 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Wed Sep 28 15:05:21 2005 Subject: [cvsspam-devel] Reducing the size of emails In-Reply-To: <9BD5776ED7344C4AA6AE50285E77A1E309665696@exchny41.ny.ssmb.com> References: <9BD5776ED7344C4AA6AE50285E77A1E309665696@exchny41.ny.ssmb.com> Message-ID: <20050928150510.GC6898@badgers-in-foil.co.uk> On Wed, Sep 28, 2005 at 10:40:04AM -0400, Rafkind, Jonathan [IT] wrote: > CVSSpam is produces very large emails for some of my commits, some in > excess of 1mb but never more than 2mb, I assume 2mb is the limit. I > would like to limit this, I think 1mb is good for now. I assume its > one of these variables, but which one is 'best' to edit and what > should I change it to? > > --cvsspam.rb > $maxSubjectLength = 200 > $maxLinesPerDiff = 1000 > $maxDiffLineLength = 1000 Actually, the thing you need to put in your cvsspam.conf is something like, $mail_size_limit = 1_048_576 # 1MB The default value is indeed 2MB. (Looks like I forgot to actually add an example of this to the config file -- oops.) NB This isn't a 'hard' limit; we only check *after* each diff is appended. hope that helps! dave -- http://david.holroyd.me.uk/ From jonathan.rafkind at citigroup.com Wed Sep 28 15:13:50 2005 From: jonathan.rafkind at citigroup.com (Rafkind, Jonathan [IT]) Date: Wed Sep 28 15:16:11 2005 Subject: [cvsspam-devel] Reducing the size of emails Message-ID: <9BD5776ED7344C4AA6AE50285E77A1E309665697@exchny41.ny.ssmb.com> Ok, havent tested this yet but it sounds like it should work. At first I thought the underscores were for clarity in this email but I guess ruby actually interprets them as unit delimiters. amazing! $mail_size_limit = 1_048_576 # 1MB Anyway, Im using $mail_size_limit = 1024 * 1024 * 1 Because I think its easier to change later. thanks a bunch :) -----Original Message----- From: cvsspam-devel-bounces@lists.badgers-in-foil.co.uk [mailto:cvsspam-devel-bounces@lists.badgers-in-foil.co.uk]On Behalf Of David Holroyd Sent: Wednesday, September 28, 2005 11:05 AM To: cvsspam-devel@lists.badgers-in-foil.co.uk Subject: Re: [cvsspam-devel] Reducing the size of emails On Wed, Sep 28, 2005 at 10:40:04AM -0400, Rafkind, Jonathan [IT] wrote: > CVSSpam is produces very large emails for some of my commits, some in > excess of 1mb but never more than 2mb, I assume 2mb is the limit. I > would like to limit this, I think 1mb is good for now. I assume its > one of these variables, but which one is 'best' to edit and what > should I change it to? > > --cvsspam.rb > $maxSubjectLength = 200 > $maxLinesPerDiff = 1000 > $maxDiffLineLength = 1000 Actually, the thing you need to put in your cvsspam.conf is something like, $mail_size_limit = 1_048_576 # 1MB The default value is indeed 2MB. (Looks like I forgot to actually add an example of this to the config file -- oops.) NB This isn't a 'hard' limit; we only check *after* each diff is appended. hope that helps! dave -- http://david.holroyd.me.uk/ _______________________________________________ cvsspam-devel mailing list cvsspam-devel@lists.badgers-in-foil.co.uk http://lists.badgers-in-foil.co.uk/mailman/listinfo/cvsspam-devel From newslogic at gmail.com Wed Sep 28 17:29:17 2005 From: newslogic at gmail.com (Andy Crain) Date: Wed Sep 28 17:30:00 2005 Subject: [cvsspam-devel] strange error in collect_diffs.rb In-Reply-To: <20050928094922.GA4465@badgers-in-foil.co.uk> References: <438949c05092723312ef77ef9@mail.gmail.com> <20050928094922.GA4465@badgers-in-foil.co.uk> Message-ID: <438949c0509281029c16c88e@mail.gmail.com> Hi David, Thanks for the reply. > Can you give it another go with the attached patch to collect_diffs.rb > applied and let us know if it works? Also, could you tell me exactly > what version of CVS you're using on the server? That helped--I no longer get the error previously reported--but now I get a new error: /cvs/CVSROOT/collect_diffs.rb:105:in `strip!': can't modify frozen string (TypeError) from /cvs/CVSROOT/collect_diffs.rb:105:in `collect_antique_style_args' from /cvs/CVSROOT/collect_diffs.rb:172:in `process_log' from /cvs/CVSROOT/collect_diffs.rb:453 I'm using v1.11.1p1 (and client is TortoiseCVS 1.8.0-RC4, in case that's needed). Andy From radoeka at xs4all.nl Wed Sep 28 18:23:31 2005 From: radoeka at xs4all.nl (Richard Bos) Date: Wed Sep 28 18:21:26 2005 Subject: [cvsspam-devel] Subversion support? In-Reply-To: <20050927091530.GA21825@badgers-in-foil.co.uk> References: <20050922031920.94982.qmail@web52505.mail.yahoo.com> <4338B3B1.9070801@pardini.net> <20050927091530.GA21825@badgers-in-foil.co.uk> Message-ID: <200509282023.31871.radoeka@xs4all.nl> Op dinsdag 27 september 2005 11:15, schreef David Holroyd: > The formatting is _fairly_ close though... > > http://www.justatheory.com/computers/programming/perl/modules/svnnotify-2.4 >0_colordiff_example.html Thanks for the example link. After all I get the "cvsspam" output by using --handel HTML::Colordiff -- Richard Bos Without a home the journey is endless From dave at badgers-in-foil.co.uk Thu Sep 29 09:00:23 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu Sep 29 09:00:26 2005 Subject: [cvsspam-devel] strange error in collect_diffs.rb In-Reply-To: <438949c0509281029c16c88e@mail.gmail.com> References: <438949c05092723312ef77ef9@mail.gmail.com> <20050928094922.GA4465@badgers-in-foil.co.uk> <438949c0509281029c16c88e@mail.gmail.com> Message-ID: <20050929090022.GA19171@badgers-in-foil.co.uk> On Wed, Sep 28, 2005 at 01:29:17PM -0400, Andy Crain wrote: > /cvs/CVSROOT/collect_diffs.rb:105:in `strip!': can't modify frozen > string (TypeError) > from /cvs/CVSROOT/collect_diffs.rb:105:in `collect_antique_style_args' > from /cvs/CVSROOT/collect_diffs.rb:172:in `process_log' > from /cvs/CVSROOT/collect_diffs.rb:453 Oops, that should not have been, cvs_info.strip! but instead, cvs_info = cvs_info.strip on line 105. Sorry about that! > I'm using v1.11.1p1 (and client is TortoiseCVS 1.8.0-RC4, in case > that's needed). Oh; I'd assumed this would be a CVS bug instoduced in some very recent release, but 1.11.1 is from quite a while back. I wonder what's going on... dave -- http://david.holroyd.me.uk/ From newslogic at gmail.com Thu Sep 29 15:41:32 2005 From: newslogic at gmail.com (Andy Crain) Date: Thu Sep 29 15:42:12 2005 Subject: [cvsspam-devel] strange error in collect_diffs.rb In-Reply-To: <20050929090022.GA19171@badgers-in-foil.co.uk> References: <438949c05092723312ef77ef9@mail.gmail.com> <20050928094922.GA4465@badgers-in-foil.co.uk> <438949c0509281029c16c88e@mail.gmail.com> <20050929090022.GA19171@badgers-in-foil.co.uk> Message-ID: <438949c050929084128e676b4@mail.gmail.com> Hi David, > Oops, that should not have been, > > cvs_info.strip! > > but instead, > > cvs_info = cvs_info.strip > > on line 105. Sorry about that! Thanks! I think that probably fixed it. But now I'm getting a different error. Don't worry, I think this one is on my end, but maybe someone could help. Now I get this on each commit: Checking in CODING_STANDARDS.txt; /cvs/newslogic_sgl/CODING_STANDARDS.txt,v <-- CODING_STANDARDS.txt new revision: 1.11; previous revision: 1.10 done usage: /usr/sbin/sendmail [-f] [-t] [-s] [-T] [-v] [address ...] The commit goes through but I do not receive an email. It appears sendmail is being called incorrectly. I have set the cvsspam.conf var $sendmail_prog alternatively to both "/usr/sbin/sendmail" and "/bin/sendmail" as both work from shell (i.e. $ echo test | /usr/sbin/sendmail my@address and $ echo test | /bin/sendmail my@address both work). Anyone have any ideas? I know it's probably something stupid. Thanks, Andy From dave at badgers-in-foil.co.uk Thu Sep 29 16:02:54 2005 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu Sep 29 16:03:00 2005 Subject: [cvsspam-devel] strange error in collect_diffs.rb In-Reply-To: <438949c050929084128e676b4@mail.gmail.com> References: <438949c05092723312ef77ef9@mail.gmail.com> <20050928094922.GA4465@badgers-in-foil.co.uk> <438949c0509281029c16c88e@mail.gmail.com> <20050929090022.GA19171@badgers-in-foil.co.uk> <438949c050929084128e676b4@mail.gmail.com> Message-ID: <20050929160254.GA23847@badgers-in-foil.co.uk> On Thu, Sep 29, 2005 at 11:41:32AM -0400, Andy Crain wrote: > Checking in CODING_STANDARDS.txt; > /cvs/newslogic_sgl/CODING_STANDARDS.txt,v <-- CODING_STANDARDS.txt > new revision: 1.11; previous revision: 1.10 > done > usage: /usr/sbin/sendmail [-f] [-t] [-s] [-T] [-v] [address ...] > > The commit goes through but I do not receive an email. It appears > sendmail is being called incorrectly. I have set the cvsspam.conf var > $sendmail_prog alternatively to both "/usr/sbin/sendmail" and > "/bin/sendmail" as both work from shell (i.e. $ echo test | > /usr/sbin/sendmail my@address and $ echo test | /bin/sendmail > my@address both work). Anyone have any ideas? I know it's probably > something stupid. It's probably a bad assumption on the part of CVSspam. When invoking sendmail, CVSspam passes the options '-t' and '-oi'. I guess your version doesn't like one of them (probably -oi). Maybe you could look at the docs for you sendmail and edit the class SendmailMailer in cvsspam.rb to suit? I'd like to know if removing -oi fixes things; and if it does, what, if any alternative to that option is available. thanks! dave -- http://david.holroyd.me.uk/ From newslogic at gmail.com Thu Sep 29 19:31:28 2005 From: newslogic at gmail.com (Andy Crain) Date: Thu Sep 29 19:32:14 2005 Subject: [cvsspam-devel] strange error in collect_diffs.rb In-Reply-To: <20050929160254.GA23847@badgers-in-foil.co.uk> References: <438949c05092723312ef77ef9@mail.gmail.com> <20050928094922.GA4465@badgers-in-foil.co.uk> <438949c0509281029c16c88e@mail.gmail.com> <20050929090022.GA19171@badgers-in-foil.co.uk> <438949c050929084128e676b4@mail.gmail.com> <20050929160254.GA23847@badgers-in-foil.co.uk> Message-ID: <438949c0509291231108f448a@mail.gmail.com> Hi David, > It's probably a bad assumption on the part of CVSspam. When invoking > sendmail, CVSspam passes the options '-t' and '-oi'. I guess your > version doesn't like one of them (probably -oi). > > Maybe you could look at the docs for you sendmail and edit the class > SendmailMailer in cvsspam.rb to suit? Ta da! That did it. Thanks. crain:/$ echo test | /usr/sbin/sendmail -t -oi my_email@address.com usage: /usr/sbin/sendmail [-f] [-t] [-s] [-T] [-v] [addr ess ...] crain:/$ echo test | /usr/sbin/sendmail -oi -t my_email@address.com usage: /usr/sbin/sendmail [-f] [-t] [-s] [-T] [-v] [addr ess ...] crain:/$ echo test | /usr/sbin/sendmail -t my_email@address.com crain:/$ > I'd like to know if removing -oi fixes things; and if it does, what, if > any alternative to that option is available. Me too. I'm a little worried about not having the -oi, and don't know why it won't work, but...can't complain. Andy From newslogic at gmail.com Thu Sep 29 21:01:22 2005 From: newslogic at gmail.com (Andy Crain) Date: Thu Sep 29 21:02:21 2005 Subject: [cvsspam-devel] inline style Message-ID: <438949c050929140184aed0d@mail.gmail.com> Hi all, This is a feature request, one that perhaps has come up before. Would it be possible to send email with inline style, or at least an option to send inline? I ask because I have several users using webmail clients, which are stripping off the head, including the style declarations, as well as removing class and id attributes from tags. The only solution I can find [1] [2] is to use inline style. Andy [1] http://www.alistapart.com/articles/cssemail/ [2] http://www.campaignmonitor.com/blog/archives/2005/08/optimizing_css_1.html From newslogic at gmail.com Thu Sep 29 22:27:25 2005 From: newslogic at gmail.com (Andy Crain) Date: Thu Sep 29 22:28:13 2005 Subject: [cvsspam-devel] Re: inline style In-Reply-To: <438949c050929140184aed0d@mail.gmail.com> References: <438949c050929140184aed0d@mail.gmail.com> Message-ID: <438949c0509291527540206b0@mail.gmail.com> Hi again, > Would it be possible to send email with inline style, or at least an > option to send inline? I ask because I have several users using > webmail clients, which are stripping off the head, including the style > declarations, as well as removing class and id attributes from tags. > The only solution I can find [1] [2] is to use inline style. FWIW, attached is a patch adding inline style to the generated html. I'm not a ruby coder, so there's a chance I've missed something, but it works for me. Colorized diffs in webmail, woo hoo! Andy -------------- next part -------------- A non-text attachment was scrubbed... Name: inlineStyle.diff Type: application/octet-stream Size: 10834 bytes Desc: not available Url : http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/attachments/20050929/b35db3d0/inlineStyle-0001.obj From jonathan.rafkind at citigroup.com Fri Sep 30 19:48:51 2005 From: jonathan.rafkind at citigroup.com (Rafkind, Jonathan [IT]) Date: Fri Sep 30 19:53:38 2005 Subject: [cvsspam-devel] Reducing the size of emails Message-ID: <9BD5776ED7344C4AA6AE50285E77A1E3096656A8@exchny41.ny.ssmb.com> Actually after testing this for a while it doesnt seem like emails are being reduced. I used the $mail_size_limit in the cvsspam.conf file but then changed it in the cvsspam.rb file to see if that would work better. I set the limit to 100k( 1024 * 100 ) but just received a cvsspam diff of 500k. Any ideas? -----Original Message----- From: cvsspam-devel-bounces@lists.badgers-in-foil.co.uk [mailto:cvsspam-devel-bounces@lists.badgers-in-foil.co.uk]On Behalf Of Rafkind, Jonathan [IT] Sent: Wednesday, September 28, 2005 11:14 AM To: David Holroyd; cvsspam-devel@lists.badgers-in-foil.co.uk Subject: RE: [cvsspam-devel] Reducing the size of emails Ok, havent tested this yet but it sounds like it should work. At first I thought the underscores were for clarity in this email but I guess ruby actually interprets them as unit delimiters. amazing! $mail_size_limit = 1_048_576 # 1MB Anyway, Im using $mail_size_limit = 1024 * 1024 * 1 Because I think its easier to change later. thanks a bunch :) -----Original Message----- From: cvsspam-devel-bounces@lists.badgers-in-foil.co.uk [mailto:cvsspam-devel-bounces@lists.badgers-in-foil.co.uk]On Behalf Of David Holroyd Sent: Wednesday, September 28, 2005 11:05 AM To: cvsspam-devel@lists.badgers-in-foil.co.uk Subject: Re: [cvsspam-devel] Reducing the size of emails On Wed, Sep 28, 2005 at 10:40:04AM -0400, Rafkind, Jonathan [IT] wrote: > CVSSpam is produces very large emails for some of my commits, some in > excess of 1mb but never more than 2mb, I assume 2mb is the limit. I > would like to limit this, I think 1mb is good for now. I assume its > one of these variables, but which one is 'best' to edit and what > should I change it to? > > --cvsspam.rb > $maxSubjectLength = 200 > $maxLinesPerDiff = 1000 > $maxDiffLineLength = 1000 Actually, the thing you need to put in your cvsspam.conf is something like, $mail_size_limit = 1_048_576 # 1MB The default value is indeed 2MB. (Looks like I forgot to actually add an example of this to the config file -- oops.) NB This isn't a 'hard' limit; we only check *after* each diff is appended. hope that helps! dave -- http://david.holroyd.me.uk/ _______________________________________________ cvsspam-devel mailing list cvsspam-devel@lists.badgers-in-foil.co.uk http://lists.badgers-in-foil.co.uk/mailman/listinfo/cvsspam-devel _______________________________________________ cvsspam-devel mailing list cvsspam-devel@lists.badgers-in-foil.co.uk http://lists.badgers-in-foil.co.uk/mailman/listinfo/cvsspam-devel From jonathan.rafkind at citigroup.com Fri Sep 30 20:32:39 2005 From: jonathan.rafkind at citigroup.com (Rafkind, Jonathan [IT]) Date: Fri Sep 30 20:33:58 2005 Subject: [cvsspam-devel] Reducing the size of emails Message-ID: <9BD5776ED7344C4AA6AE50285E77A1E3096656AA@exchny41.ny.ssmb.com> Hm, maybe I spoke to soon. I see the limit of the diffs is 100k but the email itself is much bigger because of the HTML tags. I will reduce the size further to make emails smaller. -----Original Message----- From: Rafkind, Jonathan [IT] Sent: Friday, September 30, 2005 3:49 PM To: Rafkind, Jonathan [IT]; David Holroyd; cvsspam-devel@lists.badgers-in-foil.co.uk Subject: RE: [cvsspam-devel] Reducing the size of emails Actually after testing this for a while it doesnt seem like emails are being reduced. I used the $mail_size_limit in the cvsspam.conf file but then changed it in the cvsspam.rb file to see if that would work better. I set the limit to 100k( 1024 * 100 ) but just received a cvsspam diff of 500k. Any ideas? -----Original Message----- From: cvsspam-devel-bounces@lists.badgers-in-foil.co.uk [mailto:cvsspam-devel-bounces@lists.badgers-in-foil.co.uk]On Behalf Of Rafkind, Jonathan [IT] Sent: Wednesday, September 28, 2005 11:14 AM To: David Holroyd; cvsspam-devel@lists.badgers-in-foil.co.uk Subject: RE: [cvsspam-devel] Reducing the size of emails Ok, havent tested this yet but it sounds like it should work. At first I thought the underscores were for clarity in this email but I guess ruby actually interprets them as unit delimiters. amazing! $mail_size_limit = 1_048_576 # 1MB Anyway, Im using $mail_size_limit = 1024 * 1024 * 1 Because I think its easier to change later. thanks a bunch :) -----Original Message----- From: cvsspam-devel-bounces@lists.badgers-in-foil.co.uk [mailto:cvsspam-devel-bounces@lists.badgers-in-foil.co.uk]On Behalf Of David Holroyd Sent: Wednesday, September 28, 2005 11:05 AM To: cvsspam-devel@lists.badgers-in-foil.co.uk Subject: Re: [cvsspam-devel] Reducing the size of emails On Wed, Sep 28, 2005 at 10:40:04AM -0400, Rafkind, Jonathan [IT] wrote: > CVSSpam is produces very large emails for some of my commits, some in > excess of 1mb but never more than 2mb, I assume 2mb is the limit. I > would like to limit this, I think 1mb is good for now. I assume its > one of these variables, but which one is 'best' to edit and what > should I change it to? > > --cvsspam.rb > $maxSubjectLength = 200 > $maxLinesPerDiff = 1000 > $maxDiffLineLength = 1000 Actually, the thing you need to put in your cvsspam.conf is something like, $mail_size_limit = 1_048_576 # 1MB The default value is indeed 2MB. (Looks like I forgot to actually add an example of this to the config file -- oops.) NB This isn't a 'hard' limit; we only check *after* each diff is appended. hope that helps! dave -- http://david.holroyd.me.uk/ _______________________________________________ cvsspam-devel mailing list cvsspam-devel@lists.badgers-in-foil.co.uk http://lists.badgers-in-foil.co.uk/mailman/listinfo/cvsspam-devel _______________________________________________ cvsspam-devel mailing list cvsspam-devel@lists.badgers-in-foil.co.uk http://lists.badgers-in-foil.co.uk/mailman/listinfo/cvsspam-devel