scm: mercurial: model: save parent/child relation for changesets (#5501)

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7713 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-11-03 08:03:16 +00:00
parent e0f7acaf61
commit d10102e940
1 changed files with 5 additions and 0 deletions

View File

@ -142,6 +142,11 @@ class Repository::Mercurial < Repository
:committed_on => re.time,
:comments => re.message)
re.paths.each { |e| cs.create_change(e) }
parents = {}
parents[cs] = re.parents unless re.parents.nil?
parents.each do |ch, chparents|
ch.parents = chparents.collect{|rp| find_changeset_by_name(rp)}.compact
end
end
end
end