Commit 0cdbec47 authored by Toshi MARUYAMA's avatar Toshi MARUYAMA Committed by Eric Davis

scm: mercurial: support tags at adapter (#1981).

Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4872 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent b2e4dbca
......@@ -85,6 +85,18 @@ module Redmine
:scmid => tip['node']))
end
def tags
as_ary(summary['repository']['tag']).map { |e| e['name'] }
end
# Returns map of {'tag' => 'nodeid', ...}
def tagmap
alist = as_ary(summary['repository']['tag']).map do |e|
e.values_at('name', 'node')
end
Hash[*alist.flatten]
end
def summary
@summary ||= hg 'rhsummary' do |io|
ActiveSupport::XmlMini.parse(io.read)['rhsummary']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment