Recently I've seen a lot of errors like these:<br><br>/usr/local/lib/cvsspam/collect_diffs.rb:211:in `process_log': couldn't get cvs status: (exited with 256) (RuntimeError)<br> from /usr/local/lib/cvsspam/collect_diffs.rb:195:in `each'<br>
from /usr/local/lib/cvsspam/collect_diffs.rb:195:in `process_log'<br> from /usr/local/lib/cvsspam/collect_diffs.rb:178:in `open'<br> from /usr/local/lib/cvsspam/collect_diffs.rb:178:in `process_log'<br>
from /usr/local/lib/cvsspam/collect_diffs.rb:465<br><br>It is really not clear to me what can cause this. These errors seem pretty random.<br><br>In order to cope with them I've changed collect_diffs.rb in the following way:<br>
<br><span style="font-family: courier new,monospace;">--- collect_diffs.rb.sav.27-1-09 2009-01-27 13:52:23.000000000 -0500</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">+++ collect_diffs.rb 2009-01-27 14:03:56.000000000 -0500</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">@@ -208,7 +208,15 @@</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> safer_popen($cvs_prog, "-nq", "status", change.file) do |io|</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> status = io.read</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> end</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">- fail "couldn't get cvs status: #{$!} (exited with #{$?})" unless ($?>>8</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">+ if ($?>>8)!=0</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">+ if $debug</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">+ blah "If I wasn't debugging I'd have failed: couldn't get cvs statu</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">+ file.puts "ERROR: couldn't get cvs status: #{$!} (exited with #{$?}</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">+ file.puts " ==> cannot determine tag or if the file is binary!"</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">+ else</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">+ fail "couldn't get cvs status: #{$!} (exited with #{$?})"</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">+ end</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">+ end</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> if status =~ /^\s*Sticky Tag:\s*(.+) \(branch: +/m</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> tag = $1</span><br style="font-family: courier new,monospace;">
<br><br>Of course in this way you can't get the Tag, nor understanding if it's a binary file. I'm running it with debugging turned on.<br><br>Any comment? Suggestions?<br><br>Thanks,<br>Giuliano<br>