Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Accessing Subversion Repository Information In Ruby

DZone's Guide to

Accessing Subversion Repository Information In Ruby

·
Free Resource

require 'yaml'
svn_info = YAML.load(`svn info /my/working/copy`)
puts svn_info['URL']
#=> "svn://some-remote-repository.com/svn"
puts svn_info['Revision']
#=> "133"


Should also work with svk info as well. Credit to htonl in #caboose for the YAML tip.
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}