diff --git a/lib/ohloh_scm/adapters/svn/misc.rb b/lib/ohloh_scm/adapters/svn/misc.rb index 21849379..6e4924df 100644 --- a/lib/ohloh_scm/adapters/svn/misc.rb +++ b/lib/ohloh_scm/adapters/svn/misc.rb @@ -144,10 +144,10 @@ def opt_auth # http://svn.apache.org/repos/asf/maven/plugin-testing/trunk # all have the same root value(https://svn.apache.org/repos/asf) def tags - tag_strings = `svn log -v #{ base_path}/tags | grep 'tags.\\+(from.\\+:[0-9]\\+)$'`.split(/\n/) + tag_strings = `svn ls -v #{ base_path}/tags`.split(/\n/) tag_strings.map do |tag_string| - tag_string.match(/\/tags\/(.+) \(from .+:(\d+)\)\Z/)[1..2] - end + tag_string.split(' ').values_at(-1, 0).map { |v| v.chomp('/') } + end[1..-1] end class << self diff --git a/test/unit/svn_misc_test.rb b/test/unit/svn_misc_test.rb index 8b3b16bf..551a785f 100644 --- a/test/unit/svn_misc_test.rb +++ b/test/unit/svn_misc_test.rb @@ -111,7 +111,7 @@ def test_tags mkdir -p #{ source_scm.root.gsub(/^file:../, '') }/db/transactions svn copy trunk tags/2.0 && svn commit -m 'v2.0' && svn update" - assert_equal([['2.0', source_scm.head_token.to_s]], source_scm.tags) + assert_equal([['2.0', '6']], source_scm.tags) end end end