Jacob Burkhart
5/4/2007 9:24:00 PM
require 'svn/client'
require 'svn/ra'
url = '___'
ctx = Svn::Client::Context.new
cb = Svn::Ra::Callbacks.new(ctx.auth_baton)
provider = Proc.new do
|cred, realm, default, may_save, pool|
simplecreds = Svn::Ext::Core::Svn_auth_cred_simple_t.new
simplecreds.username = "___"
simplecreds.password = "___"
simplecreds
end
cb.auth_baton = Svn::Core.auth_open(
[
Svn::Client::get_simple_prompt_provider(provider, 2)
])
cfg = Svn::Core::config_get_config(nil)
s = Svn::Ra::Session.open(url, cfg, cb)
st = s.stat('', 1)
puts <<EOS
Status of node(#{url})
created revision = #{st.created_rev}
committed time = #{Time.at(st.time / 1_000_000)}
author = #{st.last_author}
size = #{st.size}
EOS
There it is!
Now that I've figured out how to connect... I realize that the
Svn::Client interface and the Svn::Repos APIS are completely
different... and my original goal of making Retrospectiva work or
remote repositories is looking a lot bleaker.