[cvsspam-devel] RuntimeError => couldn't get cvs status: (exited with 256)
Piergiuliano Bossi
pgbossi at gmail.com
Wed Jan 28 14:29:20 GMT 2009
Recently I've seen a lot of errors like these:
/usr/local/lib/cvsspam/collect_diffs.rb:211:in `process_log': couldn't get
cvs status: (exited with 256) (RuntimeError)
from /usr/local/lib/cvsspam/collect_diffs.rb:195:in `each'
from /usr/local/lib/cvsspam/collect_diffs.rb:195:in `process_log'
from /usr/local/lib/cvsspam/collect_diffs.rb:178:in `open'
from /usr/local/lib/cvsspam/collect_diffs.rb:178:in `process_log'
from /usr/local/lib/cvsspam/collect_diffs.rb:465
It is really not clear to me what can cause this. These errors seem pretty
random.
In order to cope with them I've changed collect_diffs.rb in the following
way:
--- collect_diffs.rb.sav.27-1-09 2009-01-27 13:52:23.000000000 -0500
+++ collect_diffs.rb 2009-01-27 14:03:56.000000000 -0500
@@ -208,7 +208,15 @@
safer_popen($cvs_prog, "-nq", "status", change.file) do |io|
status = io.read
end
- fail "couldn't get cvs status: #{$!} (exited with #{$?})" unless
($?>>8
+ if ($?>>8)!=0
+ if $debug
+ blah "If I wasn't debugging I'd have failed: couldn't get cvs
statu
+ file.puts "ERROR: couldn't get cvs status: #{$!} (exited with
#{$?}
+ file.puts " ==> cannot determine tag or if the file is binary!"
+ else
+ fail "couldn't get cvs status: #{$!} (exited with #{$?})"
+ end
+ end
if status =~ /^\s*Sticky Tag:\s*(.+) \(branch: +/m
tag = $1
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.
Any comment? Suggestions?
Thanks,
Giuliano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.badgers-in-foil.co.uk/pipermail/cvsspam-devel/attachments/20090128/6ba2afd8/attachment.html
More information about the cvsspam-devel
mailing list