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
This commit is contained in:
Toshi MARUYAMA 2011-10-28 05:19:13 +00:00
parent daae07f47c
commit c71208d18d
1 changed files with 8 additions and 1 deletions

View File

@ -109,7 +109,14 @@ module Redmine
end end
def branches 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 end
# Returns map of {'branch' => 'nodeid', ...} # Returns map of {'branch' => 'nodeid', ...}