diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-10-28 05:19:13 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-10-28 05:19:13 +0000 |
commit | c71208d18de82cbfab465334a7b2fa8cadef6a46 (patch) | |
tree | 8320dc270ebcbf1eca90ff2a72897834cf3d4904 /lib/redmine/scm/adapters/mercurial_adapter.rb | |
parent | daae07f47c105f0daeac7af4a059f8a60a167a3e (diff) | |
download | redmine-c71208d18de82cbfab465334a7b2fa8cadef6a46.tar.gz redmine-c71208d18de82cbfab465334a7b2fa8cadef6a46.zip |
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
Diffstat (limited to 'lib/redmine/scm/adapters/mercurial_adapter.rb')
-rw-r--r-- | lib/redmine/scm/adapters/mercurial_adapter.rb | 9 |
1 files changed, 8 insertions, 1 deletions
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', ...} |