summaryrefslogtreecommitdiff
path: root/lib/puppet/provider
diff options
context:
space:
mode:
authorBryan Jen <bryan.jen@gmail.com>2015-09-14 09:47:27 -0700
committerBryan Jen <bryan.jen@gmail.com>2015-09-14 09:47:27 -0700
commitf0d087a1cbf99228b9edb3e1d2e28d81df794e24 (patch)
treed71e709dcf31f43f56d9220f349fc976705e437d /lib/puppet/provider
parenta39349a4388cd56aad5cfc8eead2f2a17f545287 (diff)
parent7758331f503a9198921362761079cbfd941c625e (diff)
downloadpuppet-vcsrepo-f0d087a1cbf99228b9edb3e1d2e28d81df794e24.tar.gz
puppet-vcsrepo-f0d087a1cbf99228b9edb3e1d2e28d81df794e24.tar.bz2
Merge pull request #269 from monai/develop
Add feature 'depth' and parameter 'trust_server_cert' to svn
Diffstat (limited to 'lib/puppet/provider')
-rw-r--r--lib/puppet/provider/vcsrepo/svn.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/puppet/provider/vcsrepo/svn.rb b/lib/puppet/provider/vcsrepo/svn.rb
index 905d5ad..ba77464 100644
--- a/lib/puppet/provider/vcsrepo/svn.rb
+++ b/lib/puppet/provider/vcsrepo/svn.rb
@@ -7,7 +7,7 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo)
:svnadmin => 'svnadmin',
:svnlook => 'svnlook'
- has_features :filesystem_types, :reference_tracking, :basic_auth, :configuration, :conflict
+ has_features :filesystem_types, :reference_tracking, :basic_auth, :configuration, :conflict, :depth
def create
if !@resource.value(:source)
@@ -15,7 +15,8 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo)
else
checkout_repository(@resource.value(:source),
@resource.value(:path),
- @resource.value(:revision))
+ @resource.value(:revision),
+ @resource.value(:depth))
end
update_owner
end
@@ -62,6 +63,10 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo)
args.push('--config-dir', @resource.value(:configuration))
end
+ if @resource.value(:trust_server_cert)
+ args.push('--trust-server-cert')
+ end
+
args
end
@@ -105,11 +110,14 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo)
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