changeset 6:ed5f37ea0d06 yuya

* Clumsy fix for Mercurial <1.5 failure to support footer for </log>
author Chris Cannam
date Wed, 28 Jul 2010 12:58:13 +0100
parents 93b07183b4a9
children 3c16ed8faa07
files lib/redmine/scm/adapters/mercurial_adapter.rb
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib/redmine/scm/adapters/mercurial_adapter.rb	Wed Jul 28 12:48:55 2010 +0100
+++ b/lib/redmine/scm/adapters/mercurial_adapter.rb	Wed Jul 28 12:58:13 2010 +0100
@@ -141,7 +141,7 @@
           hg_args << '-r' << "#{hgrev(identifier_from)}:#{hgrev(identifier_to)}"
           hg_args << '--limit' << options[:limit] if options[:limit]
           hg_args << without_leading_slash(path) unless path.blank?
-          doc = hg(*hg_args) { |io| REXML::Document.new(io.read) }
+          doc = hg(*hg_args) { |io| REXML::Document.new(io.read.concat('</log>')) }
           # TODO: ??? HG doesn't close the XML Document...
 
           doc.each_element('log/logentry') do |le|