From c71208d18de82cbfab465334a7b2fa8cadef6a46 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 28 Oct 2011 05:19:13 +0000 Subject: [PATCH] scm: mercurial: lib: return array of Branch class instead of array of strings at branches method (#5501) git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7673 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/mercurial_adapter.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb index 0d6965636..c5525f4e9 100644 --- a/lib/redmine/scm/adapters/mercurial_adapter.rb +++ b/lib/redmine/scm/adapters/mercurial_adapter.rb @@ -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', ...}