From: Kouhei Sutou Date: 2007-05-06T10:56:37+09:00 Subject: Re: Subversion Ruby Bindings access to URL Hi, In <39258fa0705041423xd0f7a23hfdcd7c86344d1731@mail.gmail.com> "Re: Subversion Ruby Bindings access to URL" on Sat, 5 May 2007 06:23:56 +0900, "Jacob Burkhart" wrote: > 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 < 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 require 'svn/client' url = '___' ctx = Svn::Client::Context.new ctx.add_simple_prompt_provider(2) do |cred, realm, user_name, may_save| cred.username = "___" cred.password = "___" end ctx.info(url) do |path, info| puts < 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. Svn::Client interface is similar to svn command interface. Thanks, -- kou