:svnadmin => 'svnadmin',
:svnlook => 'svnlook'
- has_features :filesystem_types, :reference_tracking, :basic_auth, :configuration
+ has_features :filesystem_types, :reference_tracking, :basic_auth, :configuration, :conflict, :depth
def create
if !@resource.value(:source)
else
checkout_repository(@resource.value(:source),
@resource.value(:path),
- @resource.value(:revision))
+ @resource.value(:revision),
+ @resource.value(:depth))
end
update_owner
end
if File.directory?(@resource.value(:path))
# :path is an svn checkout
return true if File.directory?(File.join(@resource.value(:path), '.svn'))
- if File.directory?(File.join(@resource.value(:path), 'format'))
+ if File.file?(File.join(@resource.value(:path), 'format'))
# :path is an svn server
return true if svnlook('uuid', @resource.value(:path))
end
args.push('--config-dir', @resource.value(:configuration))
end
+ if @resource.value(:trust_server_cert) != :false
+ args.push('--trust-server-cert')
+ end
+
args
end
else
buildargs.push('update', '-r', desired)
end
+
+ if @resource.value(:conflict)
+ args.push('--accept', @resource.value(:conflict))
+ end
+
at_path do
svn(*args)
end
private
- def checkout_repository(source, path, revision)
+ def checkout_repository(source, path, revision, depth)
args = buildargs.push('checkout')
if revision
args.push('-r', revision)
end
+ if depth
+ args.push('--depth', depth)
+ end
args.push(source, path)
svn(*args)
end