diff options
author | Aaron Stone <aaron@serendipity.cx> | 2013-07-19 12:50:48 -0700 |
---|---|---|
committer | Aaron Stone <aaron@serendipity.cx> | 2013-07-19 12:50:48 -0700 |
commit | f59c13151963f46a4f2fc1081450f631c2fd2395 (patch) | |
tree | 0b98a11fa510f03858acf765e99bbdeb9fe8feb0 /lib | |
parent | 1881688dc0c0ed72002d3f74764435f56f2c2429 (diff) | |
parent | a2ef96e0de924d43b2cb56ac8fd979c9eee59d72 (diff) | |
download | puppet-vcsrepo-f59c13151963f46a4f2fc1081450f631c2fd2395.tar.gz puppet-vcsrepo-f59c13151963f46a4f2fc1081450f631c2fd2395.tar.bz2 |
Merge pull request #83 from sodabrew/issue_8331_svnlook
Add support for master svn repositories
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/provider/vcsrepo/svn.rb | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/puppet/provider/vcsrepo/svn.rb b/lib/puppet/provider/vcsrepo/svn.rb index 7485ff5..3132c36 100644 --- a/lib/puppet/provider/vcsrepo/svn.rb +++ b/lib/puppet/provider/vcsrepo/svn.rb @@ -4,7 +4,8 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo) desc "Supports Subversion repositories" optional_commands :svn => 'svn', - :svnadmin => 'svnadmin' + :svnadmin => 'svnadmin', + :svnlook => 'svnlook' has_features :filesystem_types, :reference_tracking, :basic_auth, :configuration @@ -20,7 +21,13 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo) end def working_copy_exists? - File.directory?(File.join(@resource.value(:path), '.svn')) + if File.directory?(@resource.value(:path)) + # :path is an svn checkout + return true if File.directory?(File.join(@resource.value(:path), '.svn')) + # :path is an svn server + return true if svnlook('uuid', @resource.value(:path)) + end + false end def exists? @@ -33,11 +40,7 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo) def latest? at_path do - if self.revision < self.latest then - return false - else - return true - end + self.revision >= self.latest end end @@ -57,7 +60,7 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo) args.push('--config-dir', @resource.value(:configuration)) end - return args + args end def latest |