Sha256: 4c48057bc22bc3a79675095750b4e90acca15fe790169ed0181f8a32a02b58ce

Contents?: true

Size: 649 Bytes

Versions: 37

Compression:

Stored size: 649 Bytes

Contents

module OhlohScm::Adapters
	class SvnAdapter < AbstractAdapter
		def head_token
			self.info =~ /^Revision: (\d+)$/ ? $1.to_i : nil
		end

		def head
			verbose_commit("HEAD")
		end

		def parents(commit)
			# Subversion doesn't have an actual "parent" command, so get
			# a log for this commit and the one preceding it, and keep only the preceding.
			log = run "svn log --trust-server-cert --non-interactive --verbose --xml --stop-on-copy -r #{commit.token}:1 --limit 2 '#{SvnAdapter.uri_encode(self.url)}' #{opt_auth} | #{ string_encoder }"
			[deepen_commit(strip_commit_branch(OhlohScm::Parsers::SvnXmlParser.parse(log).last))]
		end
	end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
ohloh_scm-2.5.1 lib/ohloh_scm/adapters/svn/head.rb
ohloh_scm-2.4.14 lib/ohloh_scm/adapters/svn/head.rb
ohloh_scm-2.4.13 lib/ohloh_scm/adapters/svn/head.rb
ohloh_scm-2.4.12 lib/ohloh_scm/adapters/svn/head.rb
ohloh_scm-2.4.11 lib/ohloh_scm/adapters/svn/head.rb
ohloh_scm-2.4.10 lib/ohloh_scm/adapters/svn/head.rb
ohloh_scm-2.4.9 lib/ohloh_scm/adapters/svn/head.rb
ohloh_scm-2.4.8 lib/ohloh_scm/adapters/svn/head.rb
ohloh_scm-2.4.7 lib/ohloh_scm/adapters/svn/head.rb
ohloh_scm-2.4.6 lib/ohloh_scm/adapters/svn/head.rb
ohloh_scm-2.4.5 lib/ohloh_scm/adapters/svn/head.rb
ohloh_scm-2.4.4 lib/ohloh_scm/adapters/svn/head.rb
ohloh_scm-2.4.3 lib/ohloh_scm/adapters/svn/head.rb
ohloh_scm-2.4.1 lib/ohloh_scm/adapters/svn/head.rb
ohloh_scm-2.4.0 lib/ohloh_scm/adapters/svn/head.rb
ohloh_scm-2.3.5 lib/ohloh_scm/adapters/svn/head.rb
ohloh_scm-2.3.4 lib/ohloh_scm/adapters/svn/head.rb
ohloh_scm-2.3.2 lib/ohloh_scm/adapters/svn/head.rb
ohloh_scm-2.3.1 lib/ohloh_scm/adapters/svn/head.rb
ohloh_scm-2.3.0 lib/ohloh_scm/adapters/svn/head.rb