For our group, we require authentication for checking out code. When I
moved ccrb to new machine, I started getting a really weird error. I
figured out the cause: I forgot to change my subversion config to
cache the password, so svn complained. I'm just wondering if there's a
way to make ccrb more robust (or at least helpful) in the face of an
underlying failure.
$ ./cruise start
...
Build loop failed
REXML::ParseException: #<REXML::ParseException: No close tag for /log>
[stack trace]
./lib/cruise_control/../../script/../config/../lib/
cruise_control/../../script/../config/../lib/source_control/
subversion/log_parser.rb:10:in `parse'
./lib/cruise_control/../../script/../config/../lib/
cruise_control/../../script/../config/../lib/source_control/
subversion.rb:60:in `latest_revision'
[stack trace]
...
No close tag for /log
Line:
Position:
Last 80 unconsumed characters:
It turns out that svn was griping [I've marked STDOUT & STDERR
channels]:
$ svn log --revision HEAD:1 --verbose --xml --limit 1 --non-
interactive
[STDOUT]<?xml version="1.0"?>
[STDOUT]<log>
[STDERR]svn: OPTIONS of 'http://.../': authorization failed
(http://.../)
That explains the unclosed /log tag.
So, digging a little further, lib/source_control/
abstract_adapter.rb:execute_with_error_log is running the command, but
throwing away the error output:
def execute_with_error_log(command, error_log)
FileUtils.rm_f(error_log)
FileUtils.touch(error_log)
execute(command, :stderr => error_log) do |io|
stdout_output = io.readlines
begin
error_message = File.open(error_log){|f|
f.read}.strip.split("\n")[1] || ""
rescue
error_message = ""
ensure
FileUtils.rm_f(error_log)
end
return stdout_output
end
end
This is where I get "stuck" -- what's the ccrb "way" to proceed here?
Raise an error? Scribble something in the builder_status file? The
content of error_message before the method returned ("svn: OPTIONS of
'http://.../': authorization failed (http://.../)") would have pointed
out the problem. It just got buried. I'm sure that the are other
niggling errors that bubble up from underlying source control systems
from time to time.
Aloha a hui hou,
Ken
--
Ken Mayer / [EMAIL PROTECTED] / 808-722-6142 / http://www.bitwrangler.com/
_______________________________________________
Cruisecontrolrb-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users