From ca531df00f99df2e77300a08f5705d51e7544e94 Mon Sep 17 00:00:00 2001 From: Aaron Bull Schaefer Date: Tue, 14 Dec 2010 09:25:34 +0800 Subject: fix undefined method 'working_copy_exists?' error for ProviderHg --- lib/puppet/provider/vcsrepo/hg.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') 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] -- cgit v1.2.3