]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: lib: return array of Branch class instead of array of strings at...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 28 Oct 2011 05:19:13 +0000 (05:19 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 28 Oct 2011 05:19:13 +0000 (05:19 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7673 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/mercurial_adapter.rb

index 0d69656361c294bfd6d866095cc3463b1db70b43..c5525f4e9f91768bb0b6fe26711b982524cd7077 100644 (file)
@@ -109,7 +109,14 @@ module Redmine
         end
 
         def branches
-          as_ary(summary['repository']['branch']).map { |e| e['name'] }
+          brs = []
+          as_ary(summary['repository']['branch']).each do |e|
+            br = Branch.new(e['name'])
+            br.revision =  e['revision']
+            br.scmid    =  e['node']
+            brs << br
+          end
+          brs
         end
 
         # Returns map of {'branch' => 'nodeid', ...}