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
This commit is contained in:
parent
3e86dde31e
commit
c2220cffcf
|
@ -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
|
||||||
})
|
})
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue