Hi,

In <09c4cd140f62922e9ce36ffdfc835f22 / ruby-forum.com>
  "need help on libsvn-ruby" on Tue, 11 Feb 2014 10:27:16 +0100,
  "Shubhada S." <lists / ruby-forum.com> wrote:

> We want to do checkout, checkin/commit on the SVN server.
> We are using libsvn-ruby gem for the same.

What is "libsvn-ruby gem"? Does it means Ruby bindings
bundled with the Subversion package? Or
http://rubygems.org/gems/svn gem?

If it is the former, I may help you.

> We could checkout through the code, but facing issues while committing
> the
> changes. It doesn't show any error, but the changes are not reflected.
> 
> our code is as follows:
> ---------------------------------
> 
> #!/usr/bin/env ruby
> 
> # Required packages
> require "svn/core"
> require "svn/ext/core"
> require "svn/client"
> require "svn/wc"
> require "svn/repos"
> require 'fileutils'
> 
> config_username = 'sneha'
> config_password = 'seema'
> config_repository_url = '/home/vmware/MyData'
> config_output_path ='svn://10.99.129.192/var/lib/svn/Testproj'
> svn_client_commit_info_t =""
> pool =""
> 
> config_revision = 10
> 
> ctx = Svn::Client::Context.new()
> ctx.add_simple_provider
> ctx.auth_baton[Svn::Core::AUTH_PARAM_DEFAULT_USERNAME] = config_username
> ctx.auth_baton[Svn::Core::AUTH_PARAM_DEFAULT_PASSWORD] = config_password
> 
> begin
>       ctx.commit(config_repository_url, config_output_path,
> config_revision.to_i, nil)

What about the following code?

  ctx.commit(config_repository_uri)

#commit is signature is the following:

  def commit(targets, recurse=true, keep_locks=false,
             keep_changelist=false, changelist_name=nil,
             revprop_table=nil)

https://svn.apache.org/repos/asf/subversion/trunk/subversion/bindings/swig/ruby/svn/client.rb

config_output_path is strange.

> puts "before commit"
> 
>       rescue Svn::Error::CLIENT_UNRELATED_RESOURCES => e # revision
> doesn't exist
>         raise "no such revision " + revision.to_s + " at " + repos_uri
> end
> 
> ----------------------------------
> 
> Is our code correct? or Any setting needs to be done before committing
> the changes?


> Also I could not find the documentation for the libsvn gem.

Tests for Svn::Client::Context may help you:
  https://svn.apache.org/repos/asf/subversion/trunk/subversion/bindings/swig/ruby/test/test_client.rb

Thanks,
--
kou