Recently I&#39;ve seen a lot of errors like these:<br><br>/usr/local/lib/cvsspam/collect_diffs.rb:211:in `process_log&#39;: couldn&#39;t get cvs status:&nbsp; (exited with 256) (RuntimeError)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from /usr/local/lib/cvsspam/collect_diffs.rb:195:in `each&#39;<br>


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from /usr/local/lib/cvsspam/collect_diffs.rb:195:in `process_log&#39;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from /usr/local/lib/cvsspam/collect_diffs.rb:178:in `open&#39;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from /usr/local/lib/cvsspam/collect_diffs.rb:178:in `process_log&#39;<br>


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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&#39;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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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&nbsp;&nbsp;&nbsp; 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;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; safer_popen($cvs_prog, &quot;-nq&quot;, &quot;status&quot;, change.file) do |io|</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status = io.read</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fail &quot;couldn&#39;t get cvs status: #{$!} (exited with #{$?})&quot; unless ($?&gt;&gt;8</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($?&gt;&gt;8)!=0</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if $debug</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; blah &quot;If I wasn&#39;t debugging I&#39;d have failed: couldn&#39;t get cvs statu</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file.puts &quot;ERROR: couldn&#39;t get cvs status: #{$!} (exited with #{$?}</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file.puts &quot; ==&gt; cannot determine tag or if the file is binary!&quot;</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fail &quot;couldn&#39;t get cvs status: #{$!} (exited with #{$?})&quot;</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end</span><br style="font-family: courier new,monospace;">

<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if status =~ /^\s*Sticky Tag:\s*(.+) \(branch: +/m</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tag = $1</span><br style="font-family: courier new,monospace;">

<br><br>Of course in this way you can&#39;t get the Tag, nor understanding if it&#39;s a binary file. I&#39;m running it with debugging turned on.<br><br>Any comment? Suggestions?<br><br>Thanks,<br>Giuliano<br>