Hi,
We want to do checkout, checkin/commit on the SVN server.
We are using libsvn-ruby gem for the same.
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)
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.