From dave at badgers-in-foil.co.uk Mon Oct 27 11:26:11 2008 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Mon, 27 Oct 2008 11:26:11 +0000 Subject: [cvsspam-devel] Script changes for new CVS info format strings In-Reply-To: References: Message-ID: <20081027112611.GB29054@badgers-in-foil.co.uk> Hi there, On Wed, Sep 10, 2008 at 11:55:55AM -0700, David Multer wrote: > Any chance we can get an update to the scripts for those of us running > the latest CVS (1.12.13) with the new info format strings? Changes are > definitely needed in collect_diffs.rb and maybe record_lastdir.rb Have format strings changed *again*, or is your CVSspam install just not noticing that the 'new' format is in effect? collect_diffs.rb tries to inspect the value of the UseNewInfoFmtStrings property in $CVSROOT/config to decide what to do. Maybe the logic CVSspam uses to find this file or parse its content is flawed? The CVS servers I use are all on 'old' releases of CVS these days, so could you point me at more info, or suggest changes / provide a patch? Thanks for letting us know about the problem! dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Mon Oct 27 11:41:18 2008 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Mon, 27 Oct 2008 11:41:18 +0000 Subject: [cvsspam-devel] group commit notifications in one email In-Reply-To: References: Message-ID: <20081027114118.GA29270@badgers-in-foil.co.uk> Yifei, I just found your email stuck in the moderation queue (sorry), On Tue, Jul 22, 2008 at 03:21:23PM -0500, Yifei Yao wrote: > I am using CVSspam to generate email notification for CVS commit. > Currently I am receiving one email per commit. I am wondering whether > there is a way to group several commits (say in five minutes time frame) > in one email. The sample email msg posted on the CVSspam shows that one > email includes several file commits, please enlighten me in this area as > how to achieve what the sample displays. CVSspam is all geared-up to compensate for the non-atomicity of CVS commits, and does much work to group together all changes that result from a single 'cvs commit' invocation. The example you saw on the project page is actually a single CVS commit (a very strange commit that touches files from multiple top-level CVS folders, where working directories include files checked-out on different branches (!), but it's still just one 'cvs commit' invocation that creates the message). What you would like to do is technically possible, but would require some fairly significant rework of the integration between between CVS and CVSspam. Since I only want the one-commit=one-email pattern, I'm unlikely to make changes along these lines myself. Sorry! ta, dave -- http://david.holroyd.me.uk/ From david at multer.com Mon Oct 27 13:42:04 2008 From: david at multer.com (David Multer) Date: Mon, 27 Oct 2008 06:42:04 -0700 Subject: [cvsspam-devel] Script changes for new CVS info format strings In-Reply-To: <20081027112611.GB29054@badgers-in-foil.co.uk> References: <20081027112611.GB29054@badgers-in-foil.co.uk> Message-ID: <9CCD649F-D09A-4EF3-8708-2B5E0DD78BD3@multer.com> I'm using the latest CVSspam and I get the following message after a CVS commit. Before I upgraded to the latest CVS, I was getting no warning message. cvs commit: warning: Set to use deprecated info format strings. Establish compatibility with the new info file format strings (add a temporary '1' in all info files after each '%' which doesn't represent a literal percent) and set UseNewInfoFmtStrings=yes in CVSROOT/config. After that, convert individual command lines and scripts to handle the new format at your leisure. My CVS/commitinfo: ALL /usr/local/lib/cvsspam/record_lastdir.rb %r/%p %s My loginfo: ALL /usr/local/lib/cvsspam/collect_diffs.rb --to commits at domain.com % {sVv} Sounds like there might have been another format change, but I'm not sure. I don't know where the error comes from. Thanks, David On Oct 27, 2008, at 4:26 AM, David Holroyd wrote: > Hi there, > > On Wed, Sep 10, 2008 at 11:55:55AM -0700, David Multer wrote: >> Any chance we can get an update to the scripts for those of us >> running >> the latest CVS (1.12.13) with the new info format strings? Changes >> are >> definitely needed in collect_diffs.rb and maybe record_lastdir.rb > > Have format strings changed *again*, or is your CVSspam install just > not > noticing that the 'new' format is in effect? > > collect_diffs.rb tries to inspect the value of the > UseNewInfoFmtStrings > property in $CVSROOT/config to decide what to do. Maybe the logic > CVSspam uses to find this file or parse its content is flawed? > > The CVS servers I use are all on 'old' releases of CVS these days, so > could you point me at more info, or suggest changes / provide a patch? > > > Thanks for letting us know about the problem! > dave > > -- > http://david.holroyd.me.uk/ > > _______________________________________________ > cvsspam-devel mailing list > cvsspam-devel at lists.badgers-in-foil.co.uk > http://lists.badgers-in-foil.co.uk/mailman/listinfo/cvsspam-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/attachments/20081027/96222c16/attachment.htm From dave at badgers-in-foil.co.uk Mon Oct 27 17:44:20 2008 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Mon, 27 Oct 2008 17:44:20 +0000 Subject: [cvsspam-devel] Script changes for new CVS info format strings In-Reply-To: <9CCD649F-D09A-4EF3-8708-2B5E0DD78BD3@multer.com> References: <20081027112611.GB29054@badgers-in-foil.co.uk> <9CCD649F-D09A-4EF3-8708-2B5E0DD78BD3@multer.com> Message-ID: <20081027174420.GB1203@badgers-in-foil.co.uk> On Mon, Oct 27, 2008 at 06:42:04AM -0700, David Multer wrote: > I'm using the latest CVSspam and I get the following message after a > CVS commit. Before I upgraded to the latest CVS, I was getting no > warning message. > > cvs commit: warning: Set to use deprecated info format strings. > Establish > compatibility with the new info file format strings (add a temporary > '1' in > all info files after each '%' which doesn't represent a literal percent) > and set UseNewInfoFmtStrings=yes in CVSROOT/config. After that, convert > individual command lines and scripts to handle the new format at your > leisure. > > My CVS/commitinfo: > ALL /usr/local/lib/cvsspam/record_lastdir.rb %r/%p %s > > My loginfo: > ALL /usr/local/lib/cvsspam/collect_diffs.rb --to commits at domain.com % > {sVv} > Sounds like there might have been another format change, but I'm not > sure. I don't know where the error comes from. This message comes from CVS itself. I suspect that CVSspam already has the required support, but the CVS server needs to be explicitly configured to use it. CVS 1.12.xx introduced this change, and so that it doesn't just break existing commit scripts for users such as yourself, it is disabled by default. CVS detects usage of the 'old' format strings and gives you this warning, however. I can't find a direct reference to the relevant CVS documentation on the web, and I don't recall the details off the top of my head, but have a look in your CVSROOT/config and see if it includes instructions there. CVSspam should notice once you've changed CVSROOT/config and automatically start expecting to be passed command-line arguments in the new format (assuming of course that you update the format-strings at the same time). Hope that works; sorry I can't explain the precise details any more! ta, dave -- http://david.holroyd.me.uk/ From david at multer.com Mon Oct 27 18:18:19 2008 From: david at multer.com (David Multer) Date: Mon, 27 Oct 2008 11:18:19 -0700 Subject: [cvsspam-devel] Script changes for new CVS info format strings In-Reply-To: <20081027174420.GB1203@badgers-in-foil.co.uk> References: <20081027112611.GB29054@badgers-in-foil.co.uk> <9CCD649F-D09A-4EF3-8708-2B5E0DD78BD3@multer.com> <20081027174420.GB1203@badgers-in-foil.co.uk> Message-ID: <1BD02684-DB19-4744-B4B6-8A7D31F03C86@multer.com> I didn't realize you already parsed for the new format strings. I had already updated the format according to your documentation, and only had to update my CVSROOT/config. Note also that all new CVS setups include the new format strings by default and don't exhibit the problem. Everything is working great now! Thanks, David On Oct 27, 2008, at 10:44 AM, David Holroyd wrote: > On Mon, Oct 27, 2008 at 06:42:04AM -0700, David Multer wrote: >> I'm using the latest CVSspam and I get the following message after a >> CVS commit. Before I upgraded to the latest CVS, I was getting no >> warning message. >> >> cvs commit: warning: Set to use deprecated info format strings. >> Establish >> compatibility with the new info file format strings (add a temporary >> '1' in >> all info files after each '%' which doesn't represent a literal >> percent) >> and set UseNewInfoFmtStrings=yes in CVSROOT/config. After that, >> convert >> individual command lines and scripts to handle the new format at your >> leisure. >> >> My CVS/commitinfo: >> ALL /usr/local/lib/cvsspam/record_lastdir.rb %r/%p %s >> >> My loginfo: >> ALL /usr/local/lib/cvsspam/collect_diffs.rb --to commits at domain.com % >> {sVv} >> Sounds like there might have been another format change, but I'm not >> sure. I don't know where the error comes from. > > This message comes from CVS itself. I suspect that CVSspam already > has > the required support, but the CVS server needs to be explicitly > configured to use it. > > CVS 1.12.xx introduced this change, and so that it doesn't just break > existing commit scripts for users such as yourself, it is disabled by > default. CVS detects usage of the 'old' format strings and gives you > this warning, however. > > I can't find a direct reference to the relevant CVS documentation on > the > web, and I don't recall the details off the top of my head, but have a > look in your CVSROOT/config and see if it includes instructions there. > > CVSspam should notice once you've changed CVSROOT/config and > automatically start expecting to be passed command-line arguments in > the > new format (assuming of course that you update the format-strings at > the > same time). > > Hope that works; sorry I can't explain the precise details any more! > > > ta, > dave > > -- > http://david.holroyd.me.uk/ > > _______________________________________________ > cvsspam-devel mailing list > cvsspam-devel at lists.badgers-in-foil.co.uk > http://lists.badgers-in-foil.co.uk/mailman/listinfo/cvsspam-devel From pgbossi at gmail.com Thu Oct 30 17:13:32 2008 From: pgbossi at gmail.com (Piergiuliano Bossi) Date: Thu, 30 Oct 2008 13:13:32 -0400 Subject: [cvsspam-devel] RuntimeError => line did not begin with '#' Message-ID: Hi all, I've started using cvsspam in a new workplace some weeks ago (I'm a long time user, but not in the last 3 years). Everything was fine, except that yesterday there were 3 RuntimeError episodes. In all 3 instances I get something like this: /usr/local/lib/cvsspam/cvsspam.rb:229:in `advance': /tmp/#cvsspam.27771.504-36629626/logfile:424 line did not begin with '#': if_line_of_code (RuntimeError) from /usr/local/lib/cvsspam/cvsspam.rb:201:in `each' from /usr/local/lib/cvsspam/cvsspam.rb:499:in `handleLines' from /usr/local/lib/cvsspam/cvsspam.rb:1399 from /usr/local/lib/cvsspam/cvsspam.rb:1391:in `open' from /usr/local/lib/cvsspam/cvsspam.rb:1391 from /usr/local/lib/cvsspam/cvsspam.rb:1387:in `open' from /usr/local/lib/cvsspam/cvsspam.rb:1387 /usr/local/lib/cvsspam/collect_diffs.rb:296:in `mailtest': problem running '/usr/local/lib/cvsspam/cvsspam.rb' (RuntimeError) from /usr/local/lib/cvsspam/collect_diffs.rb:461 Where if_line_of_code is obviously an if statement (in java). Please note that the line numbers may be different than what you expect because I had to change the script in order to do authentication on an SMTP server and execute with nohup. Nevertheless, I don't think that my changes have caused this issue. Consider that that if_line_of_code is present in 1 file only and that file hasn't been modified in months. It has nothing to do with the code change that was going to be notified. The other 2 instance point to other code. Of course if I open the temp file I can clearly see that that line indeed doesn't start with '#'. At the same time, though, I don't see how collect_diffs.rb can have put something without a leading '#' into the temp file. Has anybody ever experienced something like this? FYI: *) ruby 1.8.5 (2007-03-13 patchlevel 35) [i386-linux] *) cvsspam 0.2.12 *) cvs 1.11.22 on a "Fedora Core release 5 (Bordeaux)" server Thanks, Giuliano -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/attachments/20081030/4a8a7b7f/attachment.htm