diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-10-28 04:56:41 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-10-28 04:56:41 +0000 |
commit | 031b5bf4eb7e9898070652f85976f1920d97bec2 (patch) | |
tree | 8543ffc848029f02df22e5f94d9ffe891ea8680a /lib/redmine/scm/adapters/mercurial_adapter.rb | |
parent | 0ff17efb4d55c19b9a6a62c7d044db3ea81f5110 (diff) | |
download | redmine-031b5bf4eb7e9898070652f85976f1920d97bec2.tar.gz redmine-031b5bf4eb7e9898070652f85976f1920d97bec2.zip |
scm: mercurial: lib: add parents to Revision class (#5501)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7666 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/scm/adapters/mercurial_adapter.rb')
-rw-r--r-- | lib/redmine/scm/adapters/mercurial_adapter.rb | 7 |
1 files changed, 6 insertions, 1 deletions
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 |