summaryrefslogtreecommitdiff
path: root/lib/puppet/provider
diff options
context:
space:
mode:
authorAaron Bull Schaefer <aaron@elasticdog.com>2010-12-14 09:25:34 +0800
committerJames Turnbull <james@lovedthanlost.net>2010-12-27 15:46:59 +0800
commitca531df00f99df2e77300a08f5705d51e7544e94 (patch)
tree811191f09388beb64a1b8f7cde426796f10a4196 /lib/puppet/provider
parentd6f233e759f5424f32192c2059c097104b55e86b (diff)
downloadpuppet-vcsrepo-ca531df00f99df2e77300a08f5705d51e7544e94.tar.gz
puppet-vcsrepo-ca531df00f99df2e77300a08f5705d51e7544e94.tar.bz2
fix undefined method 'working_copy_exists?' error for ProviderHg
Diffstat (limited to 'lib/puppet/provider')
-rw-r--r--lib/puppet/provider/vcsrepo/hg.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/puppet/provider/vcsrepo/hg.rb b/lib/puppet/provider/vcsrepo/hg.rb
index df8b4f0..10f99b9 100644
--- a/lib/puppet/provider/vcsrepo/hg.rb
+++ b/lib/puppet/provider/vcsrepo/hg.rb
@@ -15,14 +15,18 @@ Puppet::Type.type(:vcsrepo).provide(:hg, :parent => Puppet::Provider::Vcsrepo) d
end
end
- def exists?
+ def working_copy_exists?
File.directory?(File.join(@resource.value(:path), '.hg'))
end
+ def exists?
+ working_copy_exists?
+ end
+
def destroy
FileUtils.rm_rf(@resource.value(:path))
end
-
+
def revision
at_path do
current = hg('parents')[/^changeset:\s+(?:-?\d+):(\S+)/m, 1]