From Atilla.Uergen at coop.ch Fri Feb 17 10:23:59 2006 From: Atilla.Uergen at coop.ch (Atilla.Uergen@coop.ch) Date: Fri Feb 17 10:24:32 2006 Subject: [cvsspam-devel] cvsspam it doesn't work Message-ID: <2F4F51AC253AEF4EA9862FD6EAB141A07837D5@SVRMHSCLUEXV02.coop.ch> Hi, i have installed cvs-1.11.21 and now i wat to use cvsspam, when i commit my changes in Eclipse cvsspam it will not work, i don't get an commit email. after i have start the script by hand, and i get the following error messages. root@svrpadm5:/var/cvs/test/CVSROOT:/opt/cvs/cvsspam/collect_diffs.rb --to atilla.uergen@coop.ch %{sVv} /opt/cvs/cvsspam/collect_diffs.rb:149:in `process_log': missing data dir (/tmp/#cvsspam.18768.0-XXXXXX) (RuntimeError) from /opt/cvs/cvsspam/collect_diffs.rb:448 root@svrpadm5:/var/cvs/test/CVSROOT:/opt/cvs/cvsspam/record_lastdir.rb /opt/cvs/cvsspam/record_lastdir.rb:48:in `initialize': No such file or directory - CVS/Entries (Errno::ENOENT) from /opt/cvs/cvsspam/record_lastdir.rb:48 root@svrpadm5:/var/cvs/test/CVSROOT: i hope anywhere can help me. regards Atilla ?rgen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/attachments/20060217/d173fc64/attachment.htm From dave at badgers-in-foil.co.uk Fri Feb 17 21:14:01 2006 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Fri Feb 17 21:14:22 2006 Subject: [cvsspam-devel] cvsspam it doesn't work In-Reply-To: <2F4F51AC253AEF4EA9862FD6EAB141A07837D5@SVRMHSCLUEXV02.coop.ch> References: <2F4F51AC253AEF4EA9862FD6EAB141A07837D5@SVRMHSCLUEXV02.coop.ch> Message-ID: <20060217211400.GA23956@badgers-in-foil.co.uk> On Fri, Feb 17, 2006 at 11:23:59AM +0100, Atilla.Uergen@coop.ch wrote: > Hi, > > i have installed cvs-1.11.21 and now i wat to use cvsspam, when i > commit my changes in Eclipse cvsspam it will not work, i don't get an > commit email. Could you post the contents of the 'loginfo', 'commitinfo' and 'checkoutlist' files from your CVSROOT? Also, check that any changes to these files are committed to the repository. If there are any interesting messages in the Eclipse CVS console after a test commit, please post those too. > after i have start the script by hand, and i get the following error messages. > > root@svrpadm5:/var/cvs/test/CVSROOT:/opt/cvs/cvsspam/collect_diffs.rb --to atilla.uergen@coop.ch %{sVv} > /opt/cvs/cvsspam/collect_diffs.rb:149:in `process_log': missing data dir (/tmp/#cvsspam.18768.0-XXXXXX) (RuntimeError) > from /opt/cvs/cvsspam/collect_diffs.rb:448 > root@svrpadm5:/var/cvs/test/CVSROOT:/opt/cvs/cvsspam/record_lastdir.rb > /opt/cvs/cvsspam/record_lastdir.rb:48:in `initialize': No such file or directory - CVS/Entries (Errno::ENOENT) > from /opt/cvs/cvsspam/record_lastdir.rb:48 The scripts can't be run from the command line, they only work when executed by CVS, so that's why you get the strange error messages. thanks, dave -- http://david.holroyd.me.uk/ From Atilla.Uergen at coop.ch Sat Feb 18 08:28:19 2006 From: Atilla.Uergen at coop.ch (Atilla.Uergen@coop.ch) Date: Sat Feb 18 08:29:23 2006 Subject: AW: [cvsspam-devel] cvsspam it doesn't work References: <2F4F51AC253AEF4EA9862FD6EAB141A07837D5@SVRMHSCLUEXV02.coop.ch> <20060217211400.GA23956@badgers-in-foil.co.uk> Message-ID: <2F4F51AC253AEF4EA9862FD6EAB141A00150B5@SVRMHSCLUEXV02.coop.ch> hello dave, i have commit and check the changes in the repository. note: the scripts are running in a other directory (/opt/cvs/cvsspam/*.rb) the repository self is running under the "/var/cvs/test/CVSROOT/" directory. is this correct??? no, there is not interesting messages in the eclipse console. loginfo /opt/cvs/cvsspam/collect_diffs.rb --to atilla.uergen@coop.ch %{sVv} commitinfo /opt/cvs/cvsspam/record_lastdir.rb checkoutlist record_lastdir.rb collect_diffs.rb cvsspam.rb thanks, atilla ________________________________ Von: cvsspam-devel-bounces@lists.badgers-in-foil.co.uk im Auftrag von David Holroyd Gesendet: Fr 17.02.2006 22:14 An: cvsspam-devel@lists.badgers-in-foil.co.uk Betreff: Re: [cvsspam-devel] cvsspam it doesn't work On Fri, Feb 17, 2006 at 11:23:59AM +0100, Atilla.Uergen@coop.ch wrote: > Hi, > > i have installed cvs-1.11.21 and now i wat to use cvsspam, when i > commit my changes in Eclipse cvsspam it will not work, i don't get an > commit email. Could you post the contents of the 'loginfo', 'commitinfo' and 'checkoutlist' files from your CVSROOT? Also, check that any changes to these files are committed to the repository. If there are any interesting messages in the Eclipse CVS console after a test commit, please post those too. > after i have start the script by hand, and i get the following error messages. > > root@svrpadm5:/var/cvs/test/CVSROOT:/opt/cvs/cvsspam/collect_diffs.rb --to atilla.uergen@coop.ch %{sVv} > /opt/cvs/cvsspam/collect_diffs.rb:149:in `process_log': missing data dir (/tmp/#cvsspam.18768.0-XXXXXX) (RuntimeError) > from /opt/cvs/cvsspam/collect_diffs.rb:448 > root@svrpadm5:/var/cvs/test/CVSROOT:/opt/cvs/cvsspam/record_lastdir.rb > /opt/cvs/cvsspam/record_lastdir.rb:48:in `initialize': No such file or directory - CVS/Entries (Errno::ENOENT) > from /opt/cvs/cvsspam/record_lastdir.rb:48 The scripts can't be run from the command line, they only work when executed by CVS, so that's why you get the strange error messages. thanks, 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 glen at starretthome.net Sat Feb 18 15:02:56 2006 From: glen at starretthome.net (Glen Starrett) Date: Sat Feb 18 15:03:45 2006 Subject: AW: [cvsspam-devel] cvsspam it doesn't work In-Reply-To: <2F4F51AC253AEF4EA9862FD6EAB141A00150B5@SVRMHSCLUEXV02.coop.ch> References: <2F4F51AC253AEF4EA9862FD6EAB141A07837D5@SVRMHSCLUEXV02.coop.ch> <20060217211400.GA23956@badgers-in-foil.co.uk> <2F4F51AC253AEF4EA9862FD6EAB141A00150B5@SVRMHSCLUEXV02.coop.ch> Message-ID: <43F73720.7060605@starretthome.net> Atilla.Uergen@coop.ch wrote: >no, there is not interesting messages in the eclipse console. > >loginfo > >/opt/cvs/cvsspam/collect_diffs.rb --to atilla.uergen@coop.ch %{sVv} > > Check your loginfo line -- it could be that the "to" field was pasted in like that, but it should look like this: /opt/cvs/cvsspam/collect_diffs.rb --to atilla.uergen@coop.ch %{sVv} Can you commit at a command line? I don't know if Eclipse is hiding some of the CVS output, but it may tell more. What you posted isn't a lot to go on. In my install, I have the cvsspam files located inside the CVSROOT directory. I don't think that's the problem though, AFAIK you can put it anywhere as long as cvsspam files are all in the same place. Regards, Glen Starrett From Atilla.Uergen at coop.ch Mon Feb 20 09:38:42 2006 From: Atilla.Uergen at coop.ch (Atilla.Uergen@coop.ch) Date: Mon Feb 20 09:40:00 2006 Subject: AW: [cvsspam-devel] cvsspam it doesn't work Message-ID: <2F4F51AC253AEF4EA9862FD6EAB141A07837DC@SVRMHSCLUEXV02.coop.ch> Hello Glen, thanks for your info. i have commit from command line, the commit itself works successfully, but i don't get an infomail:( cvs commit: Examining . Checking in greeting.jsp; /var/cvs/test/KickStart/WebContent/pages/greeting.jsp,v <-- greeting.jsp new revision: 1.26; previous revision: 1.25 done Regards, Atilla -----Original Message----- From: Glen Starrett [mailto:glen@starretthome.net] Sent: Samstag, 18. Februar 2006 16:03 To: ?rgen Atilla Cc: dave@badgers-in-foil.co.uk; cvsspam-devel@lists.badgers-in-foil.co.uk Subject: Re: AW: [cvsspam-devel] cvsspam it doesn't work Atilla.Uergen@coop.ch wrote: >no, there is not interesting messages in the eclipse console. > >loginfo > >/opt/cvs/cvsspam/collect_diffs.rb --to atilla.uergen@coop.ch > %{sVv} > > Check your loginfo line -- it could be that the "to" field was pasted in like that, but it should look like this: /opt/cvs/cvsspam/collect_diffs.rb --to atilla.uergen@coop.ch %{sVv} Can you commit at a command line? I don't know if Eclipse is hiding some of the CVS output, but it may tell more. What you posted isn't a lot to go on. In my install, I have the cvsspam files located inside the CVSROOT directory. I don't think that's the problem though, AFAIK you can put it anywhere as long as cvsspam files are all in the same place. Regards, Glen Starrett From glen at starretthome.net Mon Feb 20 15:15:53 2006 From: glen at starretthome.net (Glen Starrett) Date: Mon Feb 20 15:16:57 2006 Subject: AW: [cvsspam-devel] cvsspam it doesn't work In-Reply-To: <2F4F51AC253AEF4EA9862FD6EAB141A07837DC@SVRMHSCLUEXV02.coop.ch> References: <2F4F51AC253AEF4EA9862FD6EAB141A07837DC@SVRMHSCLUEXV02.coop.ch> Message-ID: <43F9DD29.2000509@starretthome.net> Atilla.Uergen@coop.ch wrote: >Hello Glen, > >thanks for your info. >i have commit from command line, the commit itself works successfully, but i don't get an infomail:( > >cvs commit: Examining . >Checking in greeting.jsp; >/var/cvs/test/KickStart/WebContent/pages/greeting.jsp,v <-- greeting.jsp >new revision: 1.26; previous revision: 1.25 >done > > The loginfo command isn't running, and I see why... > > >Check your loginfo line -- it could be that the "to" field was pasted in like that, but it should look like this: > >/opt/cvs/cvsspam/collect_diffs.rb --to atilla.uergen@coop.ch %{sVv} > > ... The line is still incorrect. Oops :) It should be like this: ALL /opt/cvs/cvsspam/collect_diffs.rb --to atilla.uergen@coop.ch %{sVv} The first element is always a pattern to match, and none of your commits were matching the pattern "/opt/cvs/cvsspam/collect_diffs.rb". Glen Starrett From dave at badgers-in-foil.co.uk Mon Feb 20 15:49:49 2006 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Mon Feb 20 15:50:40 2006 Subject: AW: [cvsspam-devel] cvsspam it doesn't work In-Reply-To: <43F9DD29.2000509@starretthome.net> References: <2F4F51AC253AEF4EA9862FD6EAB141A07837DC@SVRMHSCLUEXV02.coop.ch> <43F9DD29.2000509@starretthome.net> Message-ID: <20060220154949.GA31517@badgers-in-foil.co.uk> On Mon, Feb 20, 2006 at 09:15:53AM -0600, Glen Starrett wrote: > >Check your loginfo line -- it could be that the "to" field was pasted in > >like that, but it should look like this: > > > >/opt/cvs/cvsspam/collect_diffs.rb --to atilla.uergen@coop.ch %{sVv} > ... The line is still incorrect. Oops :) > > It should be like this: > > ALL /opt/cvs/cvsspam/collect_diffs.rb --to atilla.uergen@coop.ch %{sVv} > > The first element is always a pattern to match, and none of your commits > were matching the pattern "/opt/cvs/cvsspam/collect_diffs.rb". Good catch Glen! That looks like the cause of the problem to me too. ta, dave -- http://david.holroyd.me.uk/ From Atilla.Uergen at coop.ch Mon Feb 20 15:50:33 2006 From: Atilla.Uergen at coop.ch (Atilla.Uergen@coop.ch) Date: Mon Feb 20 15:51:40 2006 Subject: AW: [cvsspam-devel] cvsspam it doesn't work Message-ID: <2F4F51AC253AEF4EA9862FD6EAB141A07837E7@SVRMHSCLUEXV02.coop.ch> Hello Glen Starrett it works fine:))))) thanks for your help. Regards, Atilla ?rgen -----Original Message----- From: Glen Starrett [mailto:glen@starretthome.net] Sent: Montag, 20. Februar 2006 16:16 To: ?rgen Atilla Cc: dave@badgers-in-foil.co.uk; cvsspam-devel@lists.badgers-in-foil.co.uk Subject: Re: AW: [cvsspam-devel] cvsspam it doesn't work Atilla.Uergen@coop.ch wrote: >Hello Glen, > >thanks for your info. >i have commit from command line, the commit itself works successfully, >but i don't get an infomail:( > >cvs commit: Examining . >Checking in greeting.jsp; >/var/cvs/test/KickStart/WebContent/pages/greeting.jsp,v <-- >greeting.jsp new revision: 1.26; previous revision: 1.25 done > > The loginfo command isn't running, and I see why... > > >Check your loginfo line -- it could be that the "to" field was pasted in like that, but it should look like this: > >/opt/cvs/cvsspam/collect_diffs.rb --to atilla.uergen@coop.ch %{sVv} > > ... The line is still incorrect. Oops :) It should be like this: ALL /opt/cvs/cvsspam/collect_diffs.rb --to atilla.uergen@coop.ch %{sVv} The first element is always a pattern to match, and none of your commits were matching the pattern "/opt/cvs/cvsspam/collect_diffs.rb". Glen Starrett From Ryan.Dlugosz at FMR.COM Tue Feb 21 20:59:03 2006 From: Ryan.Dlugosz at FMR.COM (Dlugosz, Ryan) Date: Tue Feb 21 21:00:41 2006 Subject: [cvsspam-devel] Tweaks to fix the Concurrent Commit issue Message-ID: <971DF57F968FF443862B02336FC9EF761DB11E@MSGDALCLN2WIN.DMN1.FMR.COM> We've been running into the issue where simultaneous commits result in either a strange diff email or a corrupt tmp file that cvsspam fails to process. Others on this list have discussed the issue (see: http://tinyurl.com/zlrcz). Not sure if there's any ongoing development on cvsspam, but if there is feel free to borrow some of the code changes we've made here. A quick disclaimer applies that this isn't the cleanest fix, but it does appear to work in our environment and should fail back to the typical cvsspam behavior should no "-from" address be specified or if it doesn't get a clean $USER value on your system. I'd be interested to hear about the state of cvsspam development & if there have been better ways to fix this. Attached you'll find the cvsspam output of the two commits needed to fix this... Oh, and you'll want to ignore the puts/print statements in there that got left in by mistake! -Ryan Commit in cvsspam on MAIN collect_diffs.rb <> +5 -1 1.2 -> 1.3 record_lastdir.rb <> +5 -1 1.2 -> 1.3 +10 -2 2 modified files updated to put user id in spam dir to prevent collisions cvsspam collect_diffs.rb 1.2 -> 1.3 diff -u -r1.2 -r1.3 --- collect_diffs.rb 2 Sep 2005 19:07:59 -0000 1.2 +++ collect_diffs.rb 21 Feb 2006 20:15:04 -0000 1.3 @@ -26,9 +26,10 @@ #$tmpdir = ENV["TMPDIR"] || "/tmp" $tmpdir = "/var/tmp" -$dirtemplate = "#cvsspam.#{Process.getpgrp}.#{Process.uid}" +$dirtemplate = nil def find_data_dir + $dirtemplate = "#cvsspam-#{$local_from}.#{Process.getpgrp}.#{Process.uid}" Dir["#{$tmpdir}/#{$dirtemplate}-*"].each do |dir| stat = File.stat(dir) return dir if stat.owned? @@ -145,6 +146,7 @@ def process_log(cvs_info) cvsroot = sanitise_path(ENV['CVSROOT']) + puts "From [" + $local_from + "] " $datadir = find_data_dir() raise "missing data dir (#{$tmpdir}/#{$dirtemplate}-XXXXXX)" if $datadir==nil @@ -335,6 +337,7 @@ end $config = nil +$local_from = nil $cvs_prog = "cvs" $debug = false $diff_ignore_keywords = false @@ -388,6 +391,7 @@ $passthroughArgs << opt end $config = arg if opt=="--config" + $local_from = arg if opt=="--from" $debug = true if opt == "--debug" end cvsspam record_lastdir.rb 1.2 -> 1.3 diff -u -r1.2 -r1.3 --- record_lastdir.rb 2 Sep 2005 19:08:00 -0000 1.2 +++ record_lastdir.rb 21 Feb 2006 20:15:04 -0000 1.3 @@ -4,15 +4,18 @@ # http://www.badgers-in-foil.co.uk/projects/cvsspam/ # Copyright (c) David Holroyd +$local_from_tag = ARGV.shift +$local_from = ARGV.shift $repositorydir = ARGV.shift #$tmpdir = ENV["TMPDIR"] || "/tmp" $tmpdir = "/var/tmp" # try to pick a name to avoid collisions with other people's commits -$dirtemplate = "#cvsspam.#{Process.getpgrp}.#{Process.uid}" +$dirtemplate = nil def find_data_dir + $dirtemplate = "#cvsspam-#{$local_from}.#{Process.getpgrp}.#{Process.uid}" Dir["#{$tmpdir}/#{$dirtemplate}-*"].each do |dir| stat = File.stat(dir) return dir if stat.owned? @@ -20,6 +23,7 @@ nil end + print "From [" + $local_from + "] " $datadir = find_data_dir() if $datadir==nil CVSspam 0.2.12 Commit in CVSROOT on MAIN commitinfo <> +1 -1 1.2 -> 1.3 add local user to cvsspam args CVSROOT commitinfo 1.2 -> 1.3 diff -u -r1.2 -r1.3 --- commitinfo 2 Sep 2005 19:26:13 -0000 1.2 +++ commitinfo 21 Feb 2006 19:46:53 -0000 1.3 @@ -15,5 +15,5 @@ # in addition to the first matching regex or "DEFAULT". #Send everything through cvsspam -DEFAULT /share/ics2/cvsspam/record_lastdir.rb +DEFAULT /share/ics2/cvsspam/record_lastdir.rb --from $USER CVSspam 0.2.12 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/attachments/20060221/301a15e1/attachment.html From jonathan.rafkind at citigroup.com Tue Feb 21 21:12:40 2006 From: jonathan.rafkind at citigroup.com (Rafkind, Jonathan [IT]) Date: Tue Feb 21 21:14:50 2006 Subject: [cvsspam-devel] Tweaks to fix the Concurrent Commit issue Message-ID: Its sort of funny, I had to add this same exact fix for the same exact reason. My code is about 95% verbatim what yours is too. I thought I had submitted this patch a long time ago, but I cant find that email. -----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 Dlugosz, Ryan Sent: Tuesday, February 21, 2006 3:59 PM To: cvsspam-devel@lists.badgers-in-foil.co.uk Subject: [cvsspam-devel] Tweaks to fix the Concurrent Commit issue We've been running into the issue where simultaneous commits result in either a strange diff email or a corrupt tmp file that cvsspam fails to process. Others on this list have discussed the issue (see: http://tinyurl.com/zlrcz). Not sure if there's any ongoing development on cvsspam, but if there is feel free to borrow some of the code changes we've made here. A quick disclaimer applies that this isn't the cleanest fix, but it does appear to work in our environment and should fail back to the typical cvsspam behavior should no "-from" address be specified or if it doesn't get a clean $USER value on your system. I'd be interested to hear about the state of cvsspam development & if there have been better ways to fix this. Attached you'll find the cvsspam output of the two commits needed to fix this... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/attachments/20060221/3d905698/attachment.htm From Ryan.Dlugosz at FMR.COM Tue Feb 21 21:18:19 2006 From: Ryan.Dlugosz at FMR.COM (Dlugosz, Ryan) Date: Tue Feb 21 21:19:27 2006 Subject: [cvsspam-devel] Tweaks to fix the Concurrent Commit issue Message-ID: <971DF57F968FF443862B02336FC9EF761DB120@MSGDALCLN2WIN.DMN1.FMR.COM> Wish I'd found it before we fixed it ourselves, tough I suppose it was a pretty trivial exercise. Is there any active development on this project anymore? -----Original Message----- From: Rafkind, Jonathan [IT] [mailto:jonathan.rafkind@citigroup.com] Sent: Tuesday, February 21, 2006 4:09 PM To: Dlugosz, Ryan; cvsspam-devel@lists.badgers-in-foil.co.uk Subject: RE: [cvsspam-devel] Tweaks to fix the Concurrent Commit issue Its sort of funny, I had to add this same exact fix for the same exact reason. My code is about 95% verbatim what yours is too. I thought I had submitted this patch a long time ago, but I cant find that email. -----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 Dlugosz, Ryan Sent: Tuesday, February 21, 2006 3:59 PM To: cvsspam-devel@lists.badgers-in-foil.co.uk Subject: [cvsspam-devel] Tweaks to fix the Concurrent Commit issue We've been running into the issue where simultaneous commits result in either a strange diff email or a corrupt tmp file that cvsspam fails to process. Others on this list have discussed the issue (see: http://tinyurl.com/zlrcz ). Not sure if there's any ongoing development on cvsspam, but if there is feel free to borrow some of the code changes we've made here. A quick disclaimer applies that this isn't the cleanest fix, but it does appear to work in our environment and should fail back to the typical cvsspam behavior should no "-from" address be specified or if it doesn't get a clean $USER value on your system. I'd be interested to hear about the state of cvsspam development & if there have been better ways to fix this. Attached you'll find the cvsspam output of the two commits needed to fix this... Oh, and you'll want to ignore the puts/print statements in there that got left in by mistake! -Ryan Commit in cvsspam on MAIN collect_diffs.rb +5 -1 1.2 -> 1.3 record_lastdir.rb +5 -1 1.2 -> 1.3 +10 -2 2 modified files updated to put user id in spam dir to prevent collisions cvsspam collect_diffs.rb 1.2 -> 1.3 diff -u -r1.2 -r1.3 --- collect_diffs.rb 2 Sep 2005 19:07:59 -0000 1.2 +++ collect_diffs.rb 21 Feb 2006 20:15:04 -0000 1.3 @@ -26,9 +26,10 @@ #$tmpdir = ENV["TMPDIR"] || "/tmp" $tmpdir = "/var/tmp" -$dirtemplate = "#cvsspam.#{Process.getpgrp}.#{Process.uid}" +$dirtemplate = nil def find_data_dir + $dirtemplate = "#cvsspam-#{$local_from}.#{Process.getpgrp}.#{Process.uid}" Dir["#{$tmpdir}/#{$dirtemplate}-*"].each do |dir| stat = File.stat(dir) return dir if stat.owned? @@ -145,6 +146,7 @@ def process_log(cvs_info) cvsroot = sanitise_path(ENV['CVSROOT']) + puts "From [" + $local_from + "] " $datadir = find_data_dir() raise "missing data dir (#{$tmpdir}/#{$dirtemplate}-XXXXXX)" if $datadir==nil @@ -335,6 +337,7 @@ end $config = nil +$local_from = nil $cvs_prog = "cvs" $debug = false $diff_ignore_keywords = false @@ -388,6 +391,7 @@ $passthroughArgs << opt end $config = arg if opt=="--config" + $local_from = arg if opt=="--from" $debug = true if opt == "--debug" end cvsspam record_lastdir.rb 1.2 -> 1.3 diff -u -r1.2 -r1.3 --- record_lastdir.rb 2 Sep 2005 19:08:00 -0000 1.2 +++ record_lastdir.rb 21 Feb 2006 20:15:04 -0000 1.3 @@ -4,15 +4,18 @@ # http://www.badgers-in-foil.co.uk/projects/cvsspam/ # Copyright (c) David Holroyd +$local_from_tag = ARGV.shift +$local_from = ARGV.shift $repositorydir = ARGV.shift #$tmpdir = ENV["TMPDIR"] || "/tmp" $tmpdir = "/var/tmp" # try to pick a name to avoid collisions with other people's commits -$dirtemplate = "#cvsspam.#{Process.getpgrp}.#{Process.uid}" +$dirtemplate = nil def find_data_dir + $dirtemplate = "#cvsspam-#{$local_from}.#{Process.getpgrp}.#{Process.uid}" Dir["#{$tmpdir}/#{$dirtemplate}-*"].each do |dir| stat = File.stat(dir) return dir if stat.owned? @@ -20,6 +23,7 @@ nil end + print "From [" + $local_from + "] " $datadir = find_data_dir() if $datadir==nil CVSspam 0.2.12 Commit in CVSROOT on MAIN commitinfo +1 -1 1.2 -> 1.3 add local user to cvsspam args CVSROOT commitinfo 1.2 -> 1.3 diff -u -r1.2 -r1.3 --- commitinfo 2 Sep 2005 19:26:13 -0000 1.2 +++ commitinfo 21 Feb 2006 19:46:53 -0000 1.3 @@ -15,5 +15,5 @@ # in addition to the first matching regex or "DEFAULT". #Send everything through cvsspam -DEFAULT /share/ics2/cvsspam/record_lastdir.rb +DEFAULT /share/ics2/cvsspam/record_lastdir.rb --from $USER CVSspam 0.2.12 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/attachments/20060221/1668b386/attachment.html From jonathan.rafkind at citigroup.com Tue Feb 21 21:26:46 2006 From: jonathan.rafkind at citigroup.com (Rafkind, Jonathan [IT]) Date: Tue Feb 21 21:28:19 2006 Subject: [cvsspam-devel] Tweaks to fix the Concurrent Commit issue Message-ID: Its still being maintained by David Holroyd, but I don't know how much active development is going on. -----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 Dlugosz, Ryan Sent: Tuesday, February 21, 2006 4:18 PM To: cvsspam-devel@lists.badgers-in-foil.co.uk Subject: RE: [cvsspam-devel] Tweaks to fix the Concurrent Commit issue Wish I'd found it before we fixed it ourselves, tough I suppose it was a pretty trivial exercise. Is there any active development on this project anymore? -----Original Message----- From: Rafkind, Jonathan [IT] [mailto:jonathan.rafkind@citigroup.com] Sent: Tuesday, February 21, 2006 4:09 PM To: Dlugosz, Ryan; cvsspam-devel@lists.badgers-in-foil.co.uk Subject: RE: [cvsspam-devel] Tweaks to fix the Concurrent Commit issue Its sort of funny, I had to add this same exact fix for the same exact reason. My code is about 95% verbatim what yours is too. I thought I had submitted this patch a long time ago, but I cant find that email. -----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 Dlugosz, Ryan Sent: Tuesday, February 21, 2006 3:59 PM To: cvsspam-devel@lists.badgers-in-foil.co.uk Subject: [cvsspam-devel] Tweaks to fix the Concurrent Commit issue We've been running into the issue where simultaneous commits result in either a strange diff email or a corrupt tmp file that cvsspam fails to process. Others on this list have discussed the issue (see: http://tinyurl.com/zlrcz). Not sure if there's any ongoing development on cvsspam, but if there is feel free to borrow some of the code changes we've made here. A quick disclaimer applies that this isn't the cleanest fix, but it does appear to work in our environment and should fail back to the typical cvsspam behavior should no "-from" address be specified or if it doesn't get a clean $USER value on your system. I'd be interested to hear about the state of cvsspam development & if there have been better ways to fix this. Attached you'll find the cvsspam output of the two commits needed to fix this... Oh, and you'll want to ignore the puts/print statements in there that got left in by mistake! -Ryan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/attachments/20060221/7918c303/attachment.htm From glen at delfi.ee Wed Feb 22 09:42:19 2006 From: glen at delfi.ee (Elan =?iso-8859-1?q?Ruusam=E4e?=) Date: Wed Feb 22 09:43:38 2006 Subject: [cvsspam-devel] repository path Message-ID: <200602221142.20201.glen@delfi.ee> hi i'd like to ask for a feature of having full repository module path in some header, so i could filter emails to a similiar tree that cvs is layed out in server side imap filtering. for example: X-CVS-Module: php/pukis_api/lib -- glen From jonathan.rafkind at citigroup.com Tue Feb 21 21:23:00 2006 From: jonathan.rafkind at citigroup.com (Rafkind, Jonathan [IT]) Date: Wed Feb 22 20:56:39 2006 Subject: [cvsspam-devel] Tweaks to fix the Concurrent Commit issue Message-ID: Its still being maintained by David Holroyd, but I don't know how much active development is going on. -----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 Dlugosz, Ryan Sent: Tuesday, February 21, 2006 4:18 PM To: cvsspam-devel@lists.badgers-in-foil.co.uk Subject: RE: [cvsspam-devel] Tweaks to fix the Concurrent Commit issue Wish I'd found it before we fixed it ourselves, tough I suppose it was a pretty trivial exercise. Is there any active development on this project anymore? -----Original Message----- From: Rafkind, Jonathan [IT] [mailto:jonathan.rafkind@citigroup.com] Sent: Tuesday, February 21, 2006 4:09 PM To: Dlugosz, Ryan; cvsspam-devel@lists.badgers-in-foil.co.uk Subject: RE: [cvsspam-devel] Tweaks to fix the Concurrent Commit issue Its sort of funny, I had to add this same exact fix for the same exact reason. My code is about 95% verbatim what yours is too. I thought I had submitted this patch a long time ago, but I cant find that email. -----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 Dlugosz, Ryan Sent: Tuesday, February 21, 2006 3:59 PM To: cvsspam-devel@lists.badgers-in-foil.co.uk Subject: [cvsspam-devel] Tweaks to fix the Concurrent Commit issue We've been running into the issue where simultaneous commits result in either a strange diff email or a corrupt tmp file that cvsspam fails to process. Others on this list have discussed the issue (see: http://tinyurl.com/zlrcz). Not sure if there's any ongoing development on cvsspam, but if there is feel free to borrow some of the code changes we've made here. A quick disclaimer applies that this isn't the cleanest fix, but it does appear to work in our environment and should fail back to the typical cvsspam behavior should no "-from" address be specified or if it doesn't get a clean $USER value on your system. I'd be interested to hear about the state of cvsspam development & if there have been better ways to fix this. Attached you'll find the cvsspam output of the two commits needed to fix this... Oh, and you'll want to ignore the puts/print statements in there that got left in by mistake! -Ryan Commit in cvsspam on MAIN collect_diffs.rb +5 -1 1.2 - > 1.3 record_lastdir.rb +5 -1 1.2 - > 1.3 +10 -2 2 modified files updated to put user id in spam dir to prevent collisions cvsspam collect_diffs.rb 1.2 -> 1.3 diff -u -r1.2 -r1.3 --- collect_diffs.rb 2 Sep 2005 19:07:59 -0000 1.2 +++ collect_diffs.rb 21 Feb 2006 20:15:04 -0000 1.3 @@ -26,9 +26,10 @@ #$tmpdir = ENV["TMPDIR"] || "/tmp" $tmpdir = "/var/tmp" -$dirtemplate = "#cvsspam.#{Process.getpgrp}.#{Process.uid}" +$dirtemplate = nil def find_data_dir + $dirtemplate = "#cvsspam-#{$local_from}.#{Process.getpgrp}.#{Process.uid}" Dir["#{$tmpdir}/#{$dirtemplate}-*"].each do |dir| stat = File.stat(dir) return dir if stat.owned? @@ -145,6 +146,7 @@ def process_log(cvs_info) cvsroot = sanitise_path(ENV['CVSROOT']) + puts "From [" + $local_from + "] " $datadir = find_data_dir() raise "missing data dir (#{$tmpdir}/#{$dirtemplate}-XXXXXX)" if $datadir==nil @@ -335,6 +337,7 @@ end $config = nil +$local_from = nil $cvs_prog = "cvs" $debug = false $diff_ignore_keywords = false @@ -388,6 +391,7 @@ $passthroughArgs << opt end $config = arg if opt=="--config" + $local_from = arg if opt=="--from" $debug = true if opt == "--debug" end cvsspam record_lastdir.rb 1.2 -> 1.3 diff -u -r1.2 -r1.3 --- record_lastdir.rb 2 Sep 2005 19:08:00 -0000 1.2 +++ record_lastdir.rb 21 Feb 2006 20:15:04 -0000 1.3 @@ -4,15 +4,18 @@ # http://www.badgers-in-foil.co.uk/projects/cvsspam/ # Copyright (c) David Holroyd +$local_from_tag = ARGV.shift +$local_from = ARGV.shift $repositorydir = ARGV.shift #$tmpdir = ENV["TMPDIR"] || "/tmp" $tmpdir = "/var/tmp" # try to pick a name to avoid collisions with other people's commits -$dirtemplate = "#cvsspam.#{Process.getpgrp}.#{Process.uid}" +$dirtemplate = nil def find_data_dir + $dirtemplate = "#cvsspam-#{$local_from}.#{Process.getpgrp}.#{Process.uid}" Dir["#{$tmpdir}/#{$dirtemplate}-*"].each do |dir| stat = File.stat(dir) return dir if stat.owned? @@ -20,6 +23,7 @@ nil end + print "From [" + $local_from + "] " $datadir = find_data_dir() if $datadir==nil CVSspam 0.2.12 Commit in CVSROOT on MAIN commitinfo +1 -1 1.2 - > 1.3 add local user to cvsspam args CVSROOT commitinfo 1.2 -> 1.3 diff -u -r1.2 -r1.3 --- commitinfo 2 Sep 2005 19:26:13 -0000 1.2 +++ commitinfo 21 Feb 2006 19:46:53 -0000 1.3 @@ -15,5 +15,5 @@ # in addition to the first matching regex or "DEFAULT". #Send everything through cvsspam -DEFAULT /share/ics2/cvsspam/record_lastdir.rb +DEFAULT /share/ics2/cvsspam/record_lastdir.rb --from $USER CVSspam 0.2.12 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/attachments/20060221/0b10bfe3/attachment-0001.html From rmccullough at rightnow.com Wed Feb 22 21:51:22 2006 From: rmccullough at rightnow.com (McCullough, Ryan) Date: Wed Feb 22 22:03:47 2006 Subject: [cvsspam-devel] Tweaks to fix the Concurrent Commit issue Message-ID: <72B05D2430A134479CE88C7C4BF750B30142643A@RNT-BOZ-0201.corp.rightnow.com> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3038 bytes Desc: not available Url : http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/attachments/20060222/12c5f520/smime-0001.bin From dave at badgers-in-foil.co.uk Wed Feb 22 22:31:51 2006 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Wed Feb 22 22:32:01 2006 Subject: [cvsspam-devel] Tweaks to fix the Concurrent Commit issue In-Reply-To: <971DF57F968FF443862B02336FC9EF761DB11E@MSGDALCLN2WIN.DMN1.FMR.COM> References: <971DF57F968FF443862B02336FC9EF761DB11E@MSGDALCLN2WIN.DMN1.FMR.COM> Message-ID: <20060222223151.GA4094@badgers-in-foil.co.uk> Hi there! On Tue, Feb 21, 2006 at 03:59:03PM -0500, Dlugosz, Ryan wrote: > We've been running into the issue where simultaneous commits result in > either a strange diff email or a corrupt tmp file that cvsspam fails to > process. Others on this list have discussed the issue (see: > http://tinyurl.com/zlrcz). > > Not sure if there's any ongoing development on cvsspam, but if there is > feel free to borrow some of the code changes we've made here. A quick > disclaimer applies that this isn't the cleanest fix, but it does appear > to work in our environment and should fail back to the typical cvsspam > behavior should no "-from" address be specified or if it doesn't get a > clean $USER value on your system. > > I'd be interested to hear about the state of cvsspam development & if > there have been better ways to fix this. Attached you'll find the > cvsspam output of the two commits needed to fix this... I've made some changes roughly as suggested. The attached patch basically implements the same procedure exept that it, 1) tries to get rid of any suspicious characters from the value passed to --from before we use this to create a directory 2) looks for both the old and new format directory names in collect_diffs.rb, for backwards compatability with deployments which already pass --from to that script, but not to record_lastdir.rb It would be great if others could confirm whether this works for them too. ta, dava -- http://david.holroyd.me.uk/ -------------- next part -------------- Index: collect_diffs.rb =================================================================== --- collect_diffs.rb (revision 229) +++ collect_diffs.rb (working copy) @@ -27,6 +27,13 @@ $dirtemplate = "#cvsspam.#{Process.getpgrp}.#{Process.uid}" def find_data_dir + if $from_address + safe_from = make_fromaddr_safe_for_filename($from_address) + Dir["#{$tmpdir}/#{$dirtemplate}.#{safe_from}-*"].each do |dir| + stat = File.stat(dir) + return dir if stat.owned? + end + end Dir["#{$tmpdir}/#{$dirtemplate}-*"].each do |dir| stat = File.stat(dir) return dir if stat.owned? @@ -35,6 +42,14 @@ end +# transform any special / unexpected characters appearing in the argument to +# --from so that they will not cause problems if the value is inserted into +# a file or directory name +def make_fromaddr_safe_for_filename(addr) + addr.gsub(/[^a-zA-Z0-1.,_-]/, "_") +end + + def blah(msg) if $debug $stderr.puts "collect_diffs.rb: #{msg}" @@ -340,6 +355,7 @@ end $config = nil +$from_address = nil $cvs_prog = "cvs" $debug = false $diff_ignore_keywords = false @@ -394,6 +410,7 @@ end $config = arg if opt=="--config" $debug = true if opt == "--debug" + $from_address = arg if opt == "--from" end blah("CVSROOT is #{ENV['CVSROOT']}") Index: record_lastdir.rb =================================================================== --- record_lastdir.rb (revision 229) +++ record_lastdir.rb (working copy) @@ -4,7 +4,6 @@ # http://www.badgers-in-foil.co.uk/projects/cvsspam/ # Copyright (c) David Holroyd -$repositorydir = ARGV.shift $tmpdir = ENV["TMPDIR"] || "/tmp" @@ -19,6 +18,36 @@ nil end + +# transform any special / unexpected characters appearing in the argument to +# --from so that they will not cause problems if the value is inserted into +# a file or directory name +def make_fromaddr_safe_for_filename(addr) + addr.gsub(/[^a-zA-Z0-1.,_-]/, "_") +end + +# Option processing doesn't use GetoptLong (for the moment) bacause arguments +# given to this script by CVS include the names of committed files. It +# seems quite possible that one of those file names could begin with a '-' +# and therefore be treated by GetoptLong as a value which requires processing. +# This would probably result in an error. +# +# [That could be worked around by placing a '--' option (which tells GetoptLong +# to stop processing option arguments) at the very end of the arguments to +# record_lastdir.rb in commitinfo, but that's very easily forgotten, and isn't +# really backwards compatable with the behaviour of older CVSspam releases.] +if ARGV.first == "--from" + # we could, of course, be tricked, if the first committed file in the list + # happened to be named '--from' :S + + # drop the "--from" + ARGV.shift + # and use the value which was given following the option, + $dirtemplate << "." << make_fromaddr_safe_for_filename(ARGV.shift) +end + +$repositorydir = ARGV.shift + $datadir = find_data_dir() if $datadir==nil From dave at badgers-in-foil.co.uk Wed Feb 22 22:46:00 2006 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Wed Feb 22 22:46:11 2006 Subject: [cvsspam-devel] Tweaks to fix the Concurrent Commit issue In-Reply-To: References: Message-ID: <20060222224559.GB4094@badgers-in-foil.co.uk> On Tue, Feb 21, 2006 at 04:12:40PM -0500, Rafkind, Jonathan [IT] wrote: > Its sort of funny, I had to add this same exact fix for the same exact > reason. My code is about 95% verbatim what yours is too. I thought I > had submitted this patch a long time ago, but I cant find that email. Sorry Jonathan, I do still have that patch in my Inbox somewhere. Must've got lost in the business of moving CVSspam to the public Subversion repository, which was going on around about that time. :( dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Thu Feb 23 09:05:59 2006 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu Feb 23 09:06:14 2006 Subject: [cvsspam-devel] repository path In-Reply-To: <200602221142.20201.glen@delfi.ee> References: <200602221142.20201.glen@delfi.ee> Message-ID: <20060223090558.GE4094@badgers-in-foil.co.uk> On Wed, Feb 22, 2006 at 11:42:19AM +0200, Elan Ruusam?e wrote: > i'd like to ask for a feature of having full repository module path in some > header, so i could filter emails to a similiar tree that cvs is layed out in > server side imap filtering. > > for example: > X-CVS-Module: php/pukis_api/lib I just implemented something to put the value of $CVSROOT into a header, but re-reading your email, I suspect that wasn't what you had in mind. Do you mean you'd like access to the common path prefix (under the CVSROOT) shared by all committed files (i.e. like the folder named at the very top of the CVSspam email "Commit in XXX" message)? dave -- http://david.holroyd.me.uk/ From glen at delfi.ee Thu Feb 23 15:42:39 2006 From: glen at delfi.ee (Elan =?iso-8859-1?q?Ruusam=E4e?=) Date: Thu Feb 23 15:43:33 2006 Subject: [cvsspam-devel] repository path In-Reply-To: <20060223090558.GE4094@badgers-in-foil.co.uk> References: <200602221142.20201.glen@delfi.ee> <20060223090558.GE4094@badgers-in-foil.co.uk> Message-ID: <200602231742.40054.glen@delfi.ee> On Thursday 23 February 2006 11:05, David Holroyd wrote: > On Wed, Feb 22, 2006 at 11:42:19AM +0200, Elan Ruusam?e wrote: > > i'd like to ask for a feature of having full repository module path in > > some header, so i could filter emails to a similiar tree that cvs is > > layed out in server side imap filtering. > > > > for example: > > X-CVS-Module: php/pukis_api/lib > > I just implemented something to put the value of $CVSROOT into a header, > but re-reading your email, I suspect that wasn't what you had in mind. > > Do you mean you'd like access to the common path prefix (under the > CVSROOT) shared by all committed files (i.e. like the folder named at > the very top of the CVSspam email "Commit in XXX" message)? yes. exactly. it's even better that i wanted, as i didn't think of commited files accross different module paths. -- glen From rmccullough at rightnow.com Thu Feb 23 16:26:15 2006 From: rmccullough at rightnow.com (McCullough, Ryan) Date: Thu Feb 23 16:27:25 2006 Subject: [cvsspam-devel] repository path Message-ID: <72B05D2430A134479CE88C7C4BF750B30149F8E9@RNT-BOZ-0201.corp.rightnow.com> Dave, is it also possible to make the filename in the email a link? For instance the url in viewcvs would look something like this: http://bighorn/cgi-bin/viewcvs/repo/rational/robot/sqabas32/Analytics.sbh Where can I get the "Under Development" version of cvs-spam? -Ryan -----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, February 23, 2006 2:06 AM To: cvsspam-devel@lists.badgers-in-foil.co.uk Subject: Re: [cvsspam-devel] repository path On Wed, Feb 22, 2006 at 11:42:19AM +0200, Elan Ruusam?e wrote: > i'd like to ask for a feature of having full repository module path in > some header, so i could filter emails to a similiar tree that cvs is > layed out in server side imap filtering. > > for example: > X-CVS-Module: php/pukis_api/lib I just implemented something to put the value of $CVSROOT into a header, but re-reading your email, I suspect that wasn't what you had in mind. Do you mean you'd like access to the common path prefix (under the CVSROOT) shared by all committed files (i.e. like the folder named at the very top of the CVSspam email "Commit in XXX" message)? 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3038 bytes Desc: not available Url : http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/attachments/20060223/b6663331/smime.bin From dave at badgers-in-foil.co.uk Thu Feb 23 16:51:46 2006 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu Feb 23 16:51:58 2006 Subject: [cvsspam-devel] repository path In-Reply-To: <72B05D2430A134479CE88C7C4BF750B30149F8E9@RNT-BOZ-0201.corp.rightnow.com> References: <72B05D2430A134479CE88C7C4BF750B30149F8E9@RNT-BOZ-0201.corp.rightnow.com> Message-ID: <20060223165145.GA13858@badgers-in-foil.co.uk> On Thu, Feb 23, 2006 at 09:26:15AM -0700, McCullough, Ryan wrote: > Dave, is it also possible to make the filename in the email a link? For > instance the url in viewcvs would look something like this: > http://bighorn/cgi-bin/viewcvs/repo/rational/robot/sqabas32/Analytics.sbh I think I already made a change to support this for CVSweb, but not the other web front-ends, yet. Rather than putting a link on the filename, I think it add an additional '(log)' just after the filename. > Where can I get the "Under Development" version of cvs-spam? By grabbing it from Subversion, svn co http://svn.badgers-in-foil.co.uk/cvsspam/trunk cvsspam dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Thu Feb 23 22:57:30 2006 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu Feb 23 22:57:42 2006 Subject: [cvsspam-devel] repository path In-Reply-To: <200602231742.40054.glen@delfi.ee> References: <200602221142.20201.glen@delfi.ee> <20060223090558.GE4094@badgers-in-foil.co.uk> <200602231742.40054.glen@delfi.ee> Message-ID: <20060223225729.GA20673@badgers-in-foil.co.uk> On Thu, Feb 23, 2006 at 05:42:39PM +0200, Elan Ruusam?e wrote: > On Thursday 23 February 2006 11:05, David Holroyd wrote: > > Do you mean you'd like access to the common path prefix (under the > > CVSROOT) shared by all committed files (i.e. like the folder named at > > the very top of the CVSspam email "Commit in XXX" message)? > > yes. exactly. it's even better that i wanted, as i didn't think of commited > files accross different module paths. How about the attached patch? dave -- http://david.holroyd.me.uk/ -------------- next part -------------- Index: cvsspam.rb =================================================================== --- cvsspam.rb (revision 231) +++ cvsspam.rb (working copy) @@ -1301,6 +1301,7 @@ # 2MiB limit on attached diffs, $mail_size_limit = 1024 * 1024 * 2 $arg_charset = nil +$cvsroot_email_header = false require 'getoptlong' @@ -1735,6 +1736,8 @@ # sensible header formatting, and for ensuring that the body is seperated # from the message headers by a blank line (as it is required to be). class MailContext + ENCODE_HEADERS = ["Subject", "X-CVSspam-Module-Path"] + def initialize(io) @done_headers = false @io = io @@ -1744,8 +1747,8 @@ # called def header(name, value) raise "headers already commited" if @done_headers - if name == "Subject" - $encoder.encode_header(@io, "Subject", value) + if ENCODE_HEADERS.include?(name) + $encoder.encode_header(@io, name, value) else @io.puts("#{name}: #{value}") end @@ -1883,6 +1886,14 @@ end end mail.header("X-Mailer", "CVSspam #{$version} ") + if $cvsroot_email_header + mod = '/' + if Repository.count == 1 + rep = Repository.array.first + mod << "#{rep.name}/#{rep.common_prefix}" + end + mail.header("X-CVSspam-Module-Path", mod) + end mail.body do |body| make_html_email(body) From glen at delfi.ee Tue Feb 28 09:43:38 2006 From: glen at delfi.ee (Elan =?iso-8859-13?q?Ruusam=E4e?=) Date: Tue Feb 28 09:45:15 2006 Subject: [cvsspam-devel] repository path In-Reply-To: <20060223225729.GA20673@badgers-in-foil.co.uk> References: <200602221142.20201.glen@delfi.ee> <200602231742.40054.glen@delfi.ee> <20060223225729.GA20673@badgers-in-foil.co.uk> Message-ID: <200602281143.39380.glen@delfi.ee> On Friday 24 February 2006 00:57, David Holroyd wrote: > On Thu, Feb 23, 2006 at 05:42:39PM +0200, Elan Ruusam?e wrote: > > On Thursday 23 February 2006 11:05, David Holroyd wrote: > > > Do you mean you'd like access to the common path prefix (under the > > > CVSROOT) shared by all committed files (i.e. like the folder named at > > > the very top of the CVSspam email "Commit in XXX" message)? > > > > yes. exactly. it's even better that i wanted, as i didn't think of > > commited files accross different module paths. > > How about the attached patch? yeah. works as expected. thanks! ps: it would be probably nice to include the new config directive in sample config in distribution. > dave -- glen From dave at badgers-in-foil.co.uk Tue Feb 28 11:51:52 2006 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Tue Feb 28 11:52:10 2006 Subject: [cvsspam-devel] repository path In-Reply-To: <72B05D2430A134479CE88C7C4BF750B30149FFBE@RNT-BOZ-0201.corp.rightnow.com> References: <72B05D2430A134479CE88C7C4BF750B30149FFBE@RNT-BOZ-0201.corp.rightnow.com> Message-ID: <20060228115151.GA26482@badgers-in-foil.co.uk> On Mon, Feb 27, 2006 at 03:06:46PM -0700, McCullough, Ryan wrote: > If anyone is interested, I added the (log) link for viewcvs. > > Find > class ViewCVSFrontend < WebFrontend > > Before the closing "end" of the ViewCVSFrontend class, add this: > def log_url(file) > if file.toVer > log_anchor = "#rev#{file.toVer}" > else > log_anchor = "" > end > add_repo("#{@base_url}#{urlEncode(file.path)}#{log_anchor}") > end Thanks! I've commited that change; it should be present in the next release. many thanks, dave -- http://david.holroyd.me.uk/ From rmccullough at rightnow.com Tue Feb 28 17:03:31 2006 From: rmccullough at rightnow.com (McCullough, Ryan) Date: Tue Feb 28 17:04:32 2006 Subject: [cvsspam-devel] repository path Message-ID: <72B05D2430A134479CE88C7C4BF750B3014A019B@RNT-BOZ-0201.corp.rightnow.com> Dave, is this checked into the svn repo yet? -Ryan -----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 Elan Ruusam?e Sent: Tuesday, February 28, 2006 2:44 AM To: cvsspam-devel@lists.badgers-in-foil.co.uk Subject: Re: [cvsspam-devel] repository path On Friday 24 February 2006 00:57, David Holroyd wrote: > On Thu, Feb 23, 2006 at 05:42:39PM +0200, Elan Ruusam?e wrote: > > On Thursday 23 February 2006 11:05, David Holroyd wrote: > > > Do you mean you'd like access to the common path prefix (under the > > > CVSROOT) shared by all committed files (i.e. like the folder named > > > at the very top of the CVSspam email "Commit in XXX" message)? > > > > yes. exactly. it's even better that i wanted, as i didn't think of > > commited files accross different module paths. > > How about the attached patch? yeah. works as expected. thanks! ps: it would be probably nice to include the new config directive in sample config in distribution. > dave -- glen _______________________________________________ cvsspam-devel mailing list cvsspam-devel@lists.badgers-in-foil.co.uk http://lists.badgers-in-foil.co.uk/mailman/listinfo/cvsspam-devel -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3038 bytes Desc: not available Url : http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/attachments/20060228/fa1bc8cb/smime.bin From dave at badgers-in-foil.co.uk Tue Feb 28 17:10:53 2006 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Tue Feb 28 17:11:02 2006 Subject: [cvsspam-devel] repository path In-Reply-To: <72B05D2430A134479CE88C7C4BF750B3014A019B@RNT-BOZ-0201.corp.rightnow.com> References: <72B05D2430A134479CE88C7C4BF750B3014A019B@RNT-BOZ-0201.corp.rightnow.com> Message-ID: <20060228171052.GB26482@badgers-in-foil.co.uk> On Tue, Feb 28, 2006 at 10:03:31AM -0700, McCullough, Ryan wrote: > Dave, is this checked into the svn repo yet? Yes, X-CVSspam-Module-Path header generation is comitted, though I've yet had time to do as Glen suggests, and note an example of this option in the sample config file. > > How about the attached patch? > yeah. works as expected. thanks! > > ps: it would be probably nice to include the new config directive in sample > config in distribution. ta, dave -- http://david.holroyd.me.uk/ From rmccullough at rightnow.com Tue Feb 28 17:13:29 2006 From: rmccullough at rightnow.com (McCullough, Ryan) Date: Tue Feb 28 17:14:53 2006 Subject: [cvsspam-devel] repository path Message-ID: <72B05D2430A134479CE88C7C4BF750B3014A01A6@RNT-BOZ-0201.corp.rightnow.com> No problem Dave. I will probly wait until it is in the conf file as well and then implement it from the svn repo. Can viewcvs be installed for svn? The link you sent me before was a little hard to understand what version of the files I was getting. -Ryan -----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: Tuesday, February 28, 2006 10:11 AM To: cvsspam-devel@lists.badgers-in-foil.co.uk Subject: Re: [cvsspam-devel] repository path On Tue, Feb 28, 2006 at 10:03:31AM -0700, McCullough, Ryan wrote: > Dave, is this checked into the svn repo yet? Yes, X-CVSspam-Module-Path header generation is comitted, though I've yet had time to do as Glen suggests, and note an example of this option in the sample config file. > > How about the attached patch? > yeah. works as expected. thanks! > > ps: it would be probably nice to include the new config directive in > sample config in distribution. ta, 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3038 bytes Desc: not available Url : http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/attachments/20060228/7acf676e/smime.bin From glen at starretthome.net Tue Feb 28 17:21:35 2006 From: glen at starretthome.net (Glen Starrett) Date: Tue Feb 28 17:22:09 2006 Subject: [cvsspam-devel] repository path In-Reply-To: <72B05D2430A134479CE88C7C4BF750B3014A01A6@RNT-BOZ-0201.corp.rightnow.com> References: <72B05D2430A134479CE88C7C4BF750B3014A01A6@RNT-BOZ-0201.corp.rightnow.com> Message-ID: <4404869F.6080105@starretthome.net> McCullough, Ryan wrote: >No problem Dave. I will probly wait until it is in the conf file as well and >then implement it from the svn repo. > >Can viewcvs be installed for svn? The link you sent me before was a little >hard to understand what version of the files I was getting. > > I believe the viewcvs team has branched the development and created a version for SVN. http://www.viewvc.org/ Not sure if this is the same link you got before... Regards, Glen Starrett From dave at badgers-in-foil.co.uk Tue Feb 28 17:54:02 2006 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Tue Feb 28 17:55:29 2006 Subject: [cvsspam-devel] repository path In-Reply-To: <4404869F.6080105@starretthome.net> References: <72B05D2430A134479CE88C7C4BF750B3014A01A6@RNT-BOZ-0201.corp.rightnow.com> <4404869F.6080105@starretthome.net> Message-ID: <20060228175401.GD26482@badgers-in-foil.co.uk> On Tue, Feb 28, 2006 at 11:21:35AM -0600, Glen Starrett wrote: > McCullough, Ryan wrote: > >No problem Dave. I will probly wait until it is in the conf file as well > >and then implement it from the svn repo. > > > >Can viewcvs be installed for svn? The link you sent me before was a little > >hard to understand what version of the files I was getting. > > I believe the viewcvs team has branched the development and created a > version for SVN. > > http://www.viewvc.org/ > > Not sure if this is the same link you got before... I had ViewCVS running a few months back, but broke it when I upgraded from Subversion 1.0 to 1.1 (or rather, I broke the apache config when I made the upgrade to Apache 2.0 required for mod_dav_svn support). I'll try to get it working again some time soon... thanks, dave -- http://david.holroyd.me.uk/ From rmccullough at rightnow.com Tue Feb 28 18:00:44 2006 From: rmccullough at rightnow.com (McCullough, Ryan) Date: Tue Feb 28 18:02:54 2006 Subject: [cvsspam-devel] repository path Message-ID: <72B05D2430A134479CE88C7C4BF750B3014A01F2@RNT-BOZ-0201.corp.rightnow.com> Is it me, or is it ironic that the cvsspam project is using subversion instead of cvs? :) -----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: Tuesday, February 28, 2006 10:54 AM To: cvsspam-devel@lists.badgers-in-foil.co.uk Subject: Re: [cvsspam-devel] repository path On Tue, Feb 28, 2006 at 11:21:35AM -0600, Glen Starrett wrote: > McCullough, Ryan wrote: > >No problem Dave. I will probly wait until it is in the conf file as > >well and then implement it from the svn repo. > > > >Can viewcvs be installed for svn? The link you sent me before was a > >little hard to understand what version of the files I was getting. > > I believe the viewcvs team has branched the development and created a > version for SVN. > > http://www.viewvc.org/ > > Not sure if this is the same link you got before... I had ViewCVS running a few months back, but broke it when I upgraded from Subversion 1.0 to 1.1 (or rather, I broke the apache config when I made the upgrade to Apache 2.0 required for mod_dav_svn support). I'll try to get it working again some time soon... thanks, 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3038 bytes Desc: not available Url : http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/attachments/20060228/c04709e5/smime-0001.bin From dave at badgers-in-foil.co.uk Tue Feb 28 18:16:41 2006 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Tue Feb 28 18:16:47 2006 Subject: [cvsspam-devel] repository path In-Reply-To: <72B05D2430A134479CE88C7C4BF750B3014A01E5@RNT-BOZ-0201.corp.rightnow.com> References: <72B05D2430A134479CE88C7C4BF750B3014A01E5@RNT-BOZ-0201.corp.rightnow.com> Message-ID: <20060228181641.GE26482@badgers-in-foil.co.uk> On Tue, Feb 28, 2006 at 10:53:28AM -0700, McCullough, Ryan wrote: > I have never used a subversion client. Would you recommend one? > > I am familiar with cvs and how to use it. Is subversion similar? Subversion was written to feel comfortable for CVS users. If you are familiar with command-line CVS usage, command-line SVN invocations will look familiar: svn checkout http://svn.badgers-in-foil.co.uk/cvsspam/trunk/ cvsspam cd cvsspam svn status svn update ..etc.. If you use a GUI tool, then see if it's latest version supports SVN already (there is a TortoiseSVN to complement TortoiseCVS, for instance). ta, dave -- http://david.holroyd.me.uk/ From glen at starretthome.net Tue Feb 28 18:20:13 2006 From: glen at starretthome.net (Glen Starrett) Date: Tue Feb 28 18:21:04 2006 Subject: [cvsspam-devel] repository path In-Reply-To: <72B05D2430A134479CE88C7C4BF750B3014A01F2@RNT-BOZ-0201.corp.rightnow.com> References: <72B05D2430A134479CE88C7C4BF750B3014A01F2@RNT-BOZ-0201.corp.rightnow.com> Message-ID: <4404945D.9020401@starretthome.net> Yup, I noticed that too :) Glen Starrett McCullough, Ryan wrote: >Is it me, or is it ironic that the cvsspam project is using subversion >instead of cvs? :) > >-----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: Tuesday, February 28, 2006 10:54 AM >To: cvsspam-devel@lists.badgers-in-foil.co.uk >Subject: Re: [cvsspam-devel] repository path > >On Tue, Feb 28, 2006 at 11:21:35AM -0600, Glen Starrett wrote: > > >>McCullough, Ryan wrote: >> >> >>>No problem Dave. I will probly wait until it is in the conf file as >>>well and then implement it from the svn repo. >>> >>>Can viewcvs be installed for svn? The link you sent me before was a >>>little hard to understand what version of the files I was getting. >>> >>> >>I believe the viewcvs team has branched the development and created a >>version for SVN. >> >>http://www.viewvc.org/ >> >>Not sure if this is the same link you got before... >> >> > >I had ViewCVS running a few months back, but broke it when I upgraded from >Subversion 1.0 to 1.1 (or rather, I broke the apache config when I made the >upgrade to Apache 2.0 required for mod_dav_svn support). > >I'll try to get it working again some time soon... > > >thanks, >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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/attachments/20060228/146a9633/attachment.html From dave at badgers-in-foil.co.uk Tue Feb 28 18:26:58 2006 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Tue Feb 28 18:27:06 2006 Subject: [cvsspam-devel] repository path In-Reply-To: <4404945D.9020401@starretthome.net> References: <72B05D2430A134479CE88C7C4BF750B3014A01F2@RNT-BOZ-0201.corp.rightnow.com> <4404945D.9020401@starretthome.net> Message-ID: <20060228182657.GF26482@badgers-in-foil.co.uk> On Tue, Feb 28, 2006 at 12:20:13PM -0600, Glen Starrett wrote: > McCullough, Ryan wrote: > >Is it me, or is it ironic that the cvsspam project is using subversion > >instead of cvs? :) > > Yup, I noticed that too :) http://svn.badgers-in-foil.co.uk/cvsspam/branches/svn_support/ :-p dave -- http://david.holroyd.me.uk/