diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb index 53f24735c..0d6965636 100644 --- a/lib/redmine/scm/adapters/mercurial_adapter.rb +++ b/lib/redmine/scm/adapters/mercurial_adapter.rb @@ -210,12 +210,17 @@ module Redmine :from_path => (cpmap.member?(p) ? with_leading_slash(cpmap[p]) : nil), :from_revision => (cpmap.member?(p) ? le['node'] : nil)} end.sort { |a, b| a[:path] <=> b[:path] } + parents_ary = [] + as_ary(le['parents']['parent']).map do |par| + parents_ary << par['__content__'] if par['__content__'] != "000000000000" + end yield Revision.new(:revision => le['revision'], :scmid => le['node'], :author => (le['author']['__content__'] rescue ''), :time => Time.parse(le['date']['__content__']), :message => le['msg']['__content__'], - :paths => paths) + :paths => paths, + :parents => parents_ary) end self end