summaryrefslogtreecommitdiff
path: root/lib/puppet/provider/vcsrepo
diff options
context:
space:
mode:
authorHunter Haugen <hunter@puppetlabs.com>2014-05-20 18:15:03 -0700
committerHunter Haugen <hunter@puppetlabs.com>2014-05-21 16:49:26 -0700
commit0d9e938e92a25673c3712866e2d2108a255b67d5 (patch)
tree9b183ce838cb37823ec525407050a362b1eedf1c /lib/puppet/provider/vcsrepo
parent93e0c80f38efbd1317fc3b71218cc7fd047d639a (diff)
downloadpuppet-vcsrepo-0d9e938e92a25673c3712866e2d2108a255b67d5.tar.gz
puppet-vcsrepo-0d9e938e92a25673c3712866e2d2108a255b67d5.tar.bz2
Update specs and fix FM-1361
- Add install.rb for pre-suite - Add catches for failures/changes to manifest application - Correct root ssh key copying - Add sleeps for killing processes releasing ports - Fix FM-1361
Diffstat (limited to 'lib/puppet/provider/vcsrepo')
-rw-r--r--lib/puppet/provider/vcsrepo/git.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb
index 61044e0..f6ee407 100644
--- a/lib/puppet/provider/vcsrepo/git.rb
+++ b/lib/puppet/provider/vcsrepo/git.rb
@@ -9,16 +9,15 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo)
has_features :bare_repositories, :reference_tracking, :ssh_identity, :multiple_remotes, :user, :depth
def create
+ if @resource.value(:revision) and @resource.value(:ensure) == :bare
+ fail("Cannot set a revision (#{@resource.value(:revision)}) on a bare repository")
+ end
if !@resource.value(:source)
init_repository(@resource.value(:path))
else
clone_repository(@resource.value(:source), @resource.value(:path))
if @resource.value(:revision)
- if @resource.value(:ensure) == :bare
- notice "Ignoring revision for bare repository"
- else
- checkout
- end
+ checkout
end
if @resource.value(:ensure) != :bare
update_submodules