lib/ohloh_scm/adapters/cvs/misc.rb in ohloh_scm-2.1.0 vs lib/ohloh_scm/adapters/cvs/misc.rb in ohloh_scm-2.2.0

- old
+ new

@@ -68,10 +68,14 @@ def log(most_recent_token=nil) ensure_host_key run "cvsnt -d #{self.url} rlog #{opt_branch} #{opt_time(most_recent_token)} '#{self.module_name}' | #{ string_encoder }" end + def export_tag(dest_dir, tag_name = 'HEAD') + run "cvsnt -d #{self.url} export -d'#{dest_dir}' -r #{tag_name} '#{self.module_name}'" + end + def checkout(r, local_directory) opt_D = r.token ? "-D'#{r.token}Z'" : "" ensure_host_key if FileTest.exists?(local_directory + '/CVS/Root') @@ -183,9 +187,17 @@ def ensure_host_key if self.protocol == :ext ensure_key_file = File.dirname(__FILE__) + "/../../../../bin/ensure_key" cmd = "#{ensure_key_file} '#{ self.host }'" stdout, stderr = run_with_err(cmd) + end + end + + def tags + tag_strings = run("cvs -Q -d #{ url } rlog -h #{ module_name } | awk -F\"[.:]\" '/^\\t/&&$(NF-1)!=0'").split(/\n/) + tag_strings.map do |tag_string| + tag_name, version = tag_string.split(':') + [tag_name.gsub(/\t/, ''), version.strip] end end end end