#212 new
Chad Woolley

Builder failure if SVN log fails with credentials error

Reported by Chad Woolley | September 4th, 2008 @ 06:56 PM

When there is a svn credentials error (https), command_line.rb/abstract_adapter.rb do not properly detect the nonzero return code. This results in invalid XML being processed (opening log tag with no close), which then causes XmlSimple to subsequently blow up.

When I run the exact same log command from command line or ruby via IO.popen, I always get a "1" return code, so I don't know how a zero gets returned when cruise runs the same log command.

FYI, I simulated this error by making my ~/.subversion directory readonly (all files owned by root)

Debugging output and example in attached text file.

Comments and changes to this ticket

  • Chad Woolley
  • Chad Woolley

    Chad Woolley November 28th, 2008 @ 02:01 PM

    FYI, this was a recent regression when extracting logic from the svn adapter to the abstract adapter.

  • Chad Woolley

    Chad Woolley December 18th, 2008 @ 06:15 PM

    Update - there are a couple of issues with this patch, but I believe it is due to command_line.rb not handling stderr correctly. Isn't there a way to just get the return code of the executed command? I can't see how to do it with command_line.rb, it seems to be be lost...

  • Chad Woolley

    Chad Woolley January 3rd, 2009 @ 11:29 PM

    I believe I've addressed the issues now, latest code in my repo:


    I kept the current approach in abstract_adapter.rb of only reporting an error if there is output to stderr. I think this is probably incorrect, because some tools (like git checkout branch) print to stderr even if there are no errors, and others could probably throw a nonzero return code even if they don't print anything to stderr. Regardless, I didn't want to make drastic changes and risk breaking other scm systems I can't test.

    One change I did make is to report ALL lines of stderr if there is an error, not just the first one. This shouldn't hurt anything, and will make debugging easier (I know it has cost me time in the past).

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket



Referenced by