On Sat, May 05, 2007 at 12:35:09AM +0900, Jacob Burkhart wrote:
> So I need to do something like this:
> 
> url = 'http://trac-hacks.swapoff.org/svn'
> ctx = Svn::Client::Context.new
> cb = Svn::Ra::Callbacks.new(ctx.auth_baton)
> cb.auth_baton = Svn::Core.auth_open([])
> cfg = Svn::Core::config_get_config(nil)
> s = Svn::Ra::Session.open(url, cfg, cb)
> st = s.stat(", 1)
> 
> (from: 
> http://www.oneofthewolves.com/2007/03/06/ruby-subversion-bindings-finally-some-documentation/#comment-137)
> 
> The problem with that one, is that there's no way to pass in my
> username and password for htaccess

I'm sure you can - probably doing something with the auth_baton.
Unfortunately I've not tried it myself yet, as I've not needed it.

The "Practical Subversion" book has a whole chapter on using the API though.

> Looking at the swig and other documentation It seems I need to pass a
> C struct struct svn_auth_provider_object_t
> 
> To Svn::Core.auth_open([])

I expect there's a corresponding wrapped object already in the Swig
interface. You just have to work out how to create it.

If you can google for an example written in some other language (e.g.
python) you should be able to make it work.

B.