def svn_session(commit_msg = String.new) # :nodoc:
      ctx = Svn::Client::Context.new
    
      # Function for commit messages
      ctx.set_log_msg_func do |items|
        [true, commit_msg]
      end

      # don't fail on non CA signed ssl server
      ctx.add_ssl_server_trust_file_provider

      setup_auth_baton(ctx.auth_baton)
      ctx.add_username_provider
    
      # username and password
      ctx.add_simple_prompt_provider(0) do |cred, realm, username, may_save|
        cred.username = @svn_user
        cred.password = @svn_pass
        cred.may_save = false
      end

      return ctx unless block_given?

      begin
        yield ctx
      #ensure
      #  warning!?
      #  ctx.destroy
      end
    end
def svn_session(commit_msg = String.new) # :nodoc:
      ctx = Svn::Client::Context.new
    
      # Function for commit messages
      ctx.set_log_msg_func do |items|
        [true, commit_msg]
      end

      # don't fail on non CA signed ssl server
      ctx.add_ssl_server_trust_file_provider

      setup_auth_baton(ctx.auth_baton)
      ctx.add_username_provider
    
      # username and password
      ctx.add_simple_prompt_provider(0) do |cred, realm, username, may_save|
        cred.username = @svn_user
        cred.password = @svn_pass
        cred.may_save = false
      end

      return ctx unless block_given?

      begin
        yield ctx
      #ensure
      #  warning!?
      #  ctx.destroy
      end
    end
svn session set up
--
 from
 http://svn.collab.net/repos/svn/trunk/subversion/bindings/swig/ruby/test/util.rb
++