##// END OF EJS Templates
Added svn command output to error log when SubversionAdapter#entries parsing fails....
Jean-Philippe Lang -
r769:c2220cffcfbf
parent child
Show More
@@ -66,9 +66,11 module Redmine
66 entries = Entries.new
66 entries = Entries.new
67 cmd = "#{SVN_BIN} list --xml #{target(path)}@#{identifier}"
67 cmd = "#{SVN_BIN} list --xml #{target(path)}@#{identifier}"
68 cmd << " --username #{@login} --password #{@password}" if @login
68 cmd << " --username #{@login} --password #{@password}" if @login
69 cmd << " 2>&1"
69 shellout(cmd) do |io|
70 shellout(cmd) do |io|
71 output = io.read
70 begin
72 begin
71 doc = REXML::Document.new(io)
73 doc = REXML::Document.new(output)
72 doc.elements.each("lists/list/entry") do |entry|
74 doc.elements.each("lists/list/entry") do |entry|
73 entries << Entry.new({:name => entry.elements['name'].text,
75 entries << Entry.new({:name => entry.elements['name'].text,
74 :path => ((path.empty? ? "" : "#{path}/") + entry.elements['name'].text),
76 :path => ((path.empty? ? "" : "#{path}/") + entry.elements['name'].text),
@@ -82,7 +84,8 module Redmine
82 })
84 })
83 end
85 end
84 rescue Exception => e
86 rescue Exception => e
85 logger.info("Error parsing svn output: #{e.message}")
87 logger.error("Error parsing svn output: #{e.message}")
88 logger.error("Output was:\n #{output}")
86 end
89 end
87 end
90 end
88 return nil if $? && $?.exitstatus != 0
91 return nil if $? && $?.exitstatus != 0
General Comments 0
You need to be logged in to leave comments. Login now