]> source.dussan.org Git - redmine.git/commitdiff
Added svn command output to error log when SubversionAdapter#entries parsing fails.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 30 Sep 2007 17:38:07 +0000 (17:38 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 30 Sep 2007 17:38:07 +0000 (17:38 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@780 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/subversion_adapter.rb

index eecb34c2c6c90013a13840de9e105abf53083b3e..c9a73ddda7f9aa7ad31edb98601402b28e901291 100644 (file)
@@ -66,9 +66,11 @@ module Redmine
           entries = Entries.new\r
           cmd = "#{SVN_BIN} list --xml #{target(path)}@#{identifier}"\r
           cmd << " --username #{@login} --password #{@password}" if @login\r
+          cmd << " 2>&1"\r
           shellout(cmd) do |io|\r
+            output = io.read\r
             begin\r
-              doc = REXML::Document.new(io)\r
+              doc = REXML::Document.new(output)\r
               doc.elements.each("lists/list/entry") do |entry|\r
                 entries << Entry.new({:name => entry.elements['name'].text,\r
                             :path => ((path.empty? ? "" : "#{path}/") + entry.elements['name'].text),\r
@@ -82,7 +84,8 @@ module Redmine
                             })\r
               end\r
             rescue Exception => e\r
-              logger.info("Error parsing svn output: #{e.message}")\r
+              logger.error("Error parsing svn output: #{e.message}")\r
+              logger.error("Output was:\n #{output}")\r
             end\r
           end\r
           return nil if $? && $?.exitstatus != 0\r