Commit c2220cff authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Added svn command output to error log when SubversionAdapter#entries parsing fails.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@780 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 3e86dde3
...@@ -66,9 +66,11 @@ module Redmine ...@@ -66,9 +66,11 @@ module Redmine
entries = Entries.new entries = Entries.new
cmd = "#{SVN_BIN} list --xml #{target(path)}@#{identifier}" cmd = "#{SVN_BIN} list --xml #{target(path)}@#{identifier}"
cmd << " --username #{@login} --password #{@password}" if @login cmd << " --username #{@login} --password #{@password}" if @login
cmd << " 2>&1"
shellout(cmd) do |io| shellout(cmd) do |io|
output = io.read
begin begin
doc = REXML::Document.new(io) doc = REXML::Document.new(output)
doc.elements.each("lists/list/entry") do |entry| doc.elements.each("lists/list/entry") do |entry|
entries << Entry.new({:name => entry.elements['name'].text, entries << Entry.new({:name => entry.elements['name'].text,
:path => ((path.empty? ? "" : "#{path}/") + entry.elements['name'].text), :path => ((path.empty? ? "" : "#{path}/") + entry.elements['name'].text),
...@@ -82,7 +84,8 @@ module Redmine ...@@ -82,7 +84,8 @@ module Redmine
}) })
end end
rescue Exception => e rescue Exception => e
logger.info("Error parsing svn output: #{e.message}") logger.error("Error parsing svn output: #{e.message}")
logger.error("Output was:\n #{output}")
end end
end end
return nil if $? && $?.exitstatus != 0 return nil if $? && $?.exitstatus != 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment