]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: model: save parent/child relation for changesets (#5501)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 3 Nov 2011 08:03:16 +0000 (08:03 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 3 Nov 2011 08:03:16 +0000 (08:03 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7713 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/repository/mercurial.rb

index 6db3e2566c68f7a1fd45aba07d87ba09057943fc..4f0bb89e6940737a3bfe8c636a0e800a289340d6 100644 (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