summaryrefslogtreecommitdiff
path: root/lib/puppet/provider/vcsrepo
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/provider/vcsrepo')
-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]