From: Brian Candler Date: 2007-04-04T17:21:36+09:00 Subject: Re: Subversion wrapper in Ruby On Wed, Apr 04, 2007 at 05:26:12AM +0900, Daniel Schierbeck wrote: > I've begun developing a small library that wraps the command-line > Subversion commands, so that you can call SVN.copy(src, dest, :message > => 'chunky bacon') etc. These will only cover the methods Subversion > directly supports. > > The reason I'm making this library is actually that I want to have Rake > tasks that automate tagging, branching, etc. of my repository. > Currently, the most advanced thing I have is this: > > SVN::TagReleaseTask.new do |t| > t.repository = 'svn://svn.example.org/bacon' > t.version = '1.2.3' > end > > Calling `rake svn:tag:release' will then issue the following to the > command line: > > svn copy svn://svn.example.org/bacon/trunk > svn://svn.example.org/bacon/tags/release-1.2.3 --message "tagging > release 1.2.3" As an aside: there are direct Ruby bindings into the underlying libsvn, so it's possible to talk to a SVN repository directly (local or remote) without spawning an external command. Unfortunately libsvn doesn't seem to be well documented, especially for remote access. A couple of interesting posts are here: http://agylen.com/2006/07/14/using-the-ruby-bindings-for-subversion/ http://www.oneofthewolves.com/2007/03/06/ruby-subversion-bindings-finally-some-documentation/ So you're probably right to use the command-line interface. Regards, Brian.