SVN checkout on windows enviornment

Hi All,

I am trying to checkout a certain folders from svn repository.

I am using this code snippet to checkout a folder from a chef recipe.

subversion “test” do
repository "svn://10.10.101.100/Documents/release/IRUS"
destination "D:\latest_code\IRUS"
revision "HEAD"
action "export"
svn_username "sachin"
svn_password "xxxxxxx"
end

I had also tried using checkout option instead of export but again the same
error.

[2016-05-31T11:27:02+05:30] INFO: — Cookbook: tomcat / Recipe:
_code_latest
Converging 1 resources
Recipe: tomcat::_code_latest

  • subversion[test] action export[2016-05-31T11:27:02+05:30] INFO:
    Processing s
    ubversion[test] action export (tomcat::_code_latest line 46)

    Error executing action export on resource ‘subversion[test]’

    RuntimeError
    Could not parse svn info data:

    Resource Declaration:

    In

C:\Users\sachin.kumar\sachin\cookbooks\tomcat\recipes_code_latest.rb

 46: subversion "test" do
 47:   repository "svn://10.10.101.100/Documents/release/IRUS"
 48:   destination "D:\\latest_code\\IRUS"
 49:   revision "HEAD"
 50:   action "export"
 51:   svn_username "sachin"
 52:   svn_password "xxxxxxx"
 53: end
 54:

Compiled Resource:
# Declared in

C:\Users\sachin.kumar\sachin\cookbooks\tomcat\recipes_code_latest.rb:46:in
`from_file’

subversion("test") do
  action [:export]
  retries 0
  retry_delay 2
  default_guard_interpreter :default
  destination "D:\\latest_code\\IRUS"
  enable_checkout true
  revision "HEAD"
  remote "origin"
  checkout_branch "deploy"
  svn_arguments "--no-auth-cache"
  svn_info_args "--no-auth-cache"
  declared_type :subversion
  cookbook_name :tomcat
  recipe_name "_code_latest"
  repository "svn://10.10.101.100/Documents/release/IRUS"
  svn_username "sachin"
  svn_password "xxxxxxx"
end

[2016-05-31T11:27:02+05:30] INFO: Running queued delayed notifications
before re-raising exception

Running handlers:
[2016-05-31T11:27:02+05:30] ERROR: Running exception handlers Running
handlers complete
[2016-05-31T11:27:02+05:30] ERROR: Exception handlers complete Chef Client
failed. 0 resources updated in 13 seconds
[2016-05-31T11:27:02+05:30] FATAL: Stacktrace dumped to
C:/chef/cache/chef-stacktrace.out
[2016-05-31T11:27:02+05:30] FATAL: RuntimeError: subversion[test]
(tomcat::_code
_latest line 46) had an error: RuntimeError: Could not parse svn info
data:

C:\Users\sachin.kumar\sachin>

Does anyone has any idea how to deal with this??

Thanks,
Sachin

Hi All,

There is a workaround for these errors.
I installed the svn client (with command line options) and then called a
batch resource to checkout code as

execute ‘Install svn client’ do
command "msiexec ADDLOCAL=ALL /i
#{node[:tomcat][:svn_temp_dir]}\#{node[:tomcat][:svn_package_name]} /qn "
action :run
end

batch ‘latest_code’ do
code <<-EOH
set SVNURL="svn://10.10.101.100/Documents/release/IRUS"
set CheckOutLocation="D:\latest_code"
set SVNExe=“C:\Program Files\TortoiseSVN\bin\svn.exe”
%SVNExe% checkout %SVNURL% %CheckOutLocation% --username “sachin”
–password "xxxxxx"
EOH

It worked for me. I don’t know why subversion resource is not working for
svn.

Thanks,
Sachin