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/svn.rb18
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/puppet/provider/vcsrepo/svn.rb b/lib/puppet/provider/vcsrepo/svn.rb
index f712bf5..e856220 100644
--- a/lib/puppet/provider/vcsrepo/svn.rb
+++ b/lib/puppet/provider/vcsrepo/svn.rb
@@ -26,6 +26,22 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo)
def destroy
FileUtils.rm_rf(@resource.value(:path))
end
+
+ def latest?
+ at_path do
+ if self.revision < self.latest then
+ return false
+ else
+ return true
+ end
+ end
+ end
+
+ def latest
+ at_path do
+ svn('info', '-r', 'HEAD')[/^Revision:\s+(\d+)/m, 1]
+ end
+ end
def revision
at_path do
@@ -59,4 +75,4 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo)
svnadmin(*args)
end
-end
+end \ No newline at end of file