summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/provider/vcsrepo/bzr.rb2
-rw-r--r--lib/puppet/provider/vcsrepo/cvs.rb11
-rw-r--r--lib/puppet/provider/vcsrepo/git.rb4
-rw-r--r--lib/puppet/provider/vcsrepo/svn.rb4
-rw-r--r--lib/puppet/type/vcsrepo.rb5
5 files changed, 13 insertions, 13 deletions
diff --git a/lib/puppet/provider/vcsrepo/bzr.rb b/lib/puppet/provider/vcsrepo/bzr.rb
index 3a93e35..f9d58e2 100644
--- a/lib/puppet/provider/vcsrepo/bzr.rb
+++ b/lib/puppet/provider/vcsrepo/bzr.rb
@@ -26,7 +26,7 @@ Puppet::Type.type(:vcsrepo).provide(:bzr, :parent => Puppet::Provider::Vcsrepo)
def destroy
FileUtils.rm_rf(@resource.value(:path))
end
-
+
def revision
at_path do
current_revid = bzr('version-info')[/^revision-id:\s+(\S+)/, 1]
diff --git a/lib/puppet/provider/vcsrepo/cvs.rb b/lib/puppet/provider/vcsrepo/cvs.rb
index 85178f1..5cdcfb8 100644
--- a/lib/puppet/provider/vcsrepo/cvs.rb
+++ b/lib/puppet/provider/vcsrepo/cvs.rb
@@ -6,7 +6,7 @@ Puppet::Type.type(:vcsrepo).provide(:cvs, :parent => Puppet::Provider::Vcsrepo)
optional_commands :cvs => 'cvs'
defaultfor :cvs => :exists
has_features :gzip_compression, :reference_tracking, :modules
-
+
def create
if !@resource.value(:source)
create_repository(@resource.value(:path))
@@ -28,12 +28,12 @@ Puppet::Type.type(:vcsrepo).provide(:cvs, :parent => Puppet::Provider::Vcsrepo)
def working_copy_exists?
File.directory?(File.join(@resource.value(:path), 'CVS'))
end
-
+
def destroy
FileUtils.rm_rf(@resource.value(:path))
end
- def latest?
+ def latest?
debug "Checking for updates because 'ensure => latest'"
at_path do
# We cannot use -P to prune empty dirs, otherwise
@@ -44,10 +44,10 @@ Puppet::Type.type(:vcsrepo).provide(:cvs, :parent => Puppet::Provider::Vcsrepo)
return is_current
end
end
-
+
def latest
# CVS does not have a conecpt like commit-IDs or change
- # sets, so we can only have the current branch name (or the
+ # sets, so we can only have the current branch name (or the
# requested one, if that differs) as the "latest" revision.
should = @resource.value(:revision)
current = self.revision
@@ -117,5 +117,4 @@ Puppet::Type.type(:vcsrepo).provide(:cvs, :parent => Puppet::Provider::Vcsrepo)
set_ownership
end
end
-
end
diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb
index afd9963..95115c6 100644
--- a/lib/puppet/provider/vcsrepo/git.rb
+++ b/lib/puppet/provider/vcsrepo/git.rb
@@ -96,8 +96,8 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo)
def update_references
at_path do
- checkout
- git_with_identity('pull', @resource.value(:remote))
+ git_with_identity('fetch', @resource.value(:remote))
+ git_with_identity('fetch', '--tags', @resource.value(:remote))
update_owner_and_excludes
end
end
diff --git a/lib/puppet/provider/vcsrepo/svn.rb b/lib/puppet/provider/vcsrepo/svn.rb
index bd420b5..85c5089 100644
--- a/lib/puppet/provider/vcsrepo/svn.rb
+++ b/lib/puppet/provider/vcsrepo/svn.rb
@@ -41,7 +41,7 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo)
end
end
end
-
+
def buildargs
args = ['--non-interactive']
if @resource.value(:basic_auth_username) && @resource.value(:basic_auth_password)
@@ -58,7 +58,7 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo)
svn(*args)[/^Last Changed Rev:\s+(\d+)/m, 1]
end
end
-
+
def revision
args = buildargs.push('info')
at_path do
diff --git a/lib/puppet/type/vcsrepo.rb b/lib/puppet/type/vcsrepo.rb
index 352f439..1fd006b 100644
--- a/lib/puppet/type/vcsrepo.rb
+++ b/lib/puppet/type/vcsrepo.rb
@@ -21,7 +21,7 @@ Puppet::Type.newtype(:vcsrepo) do
feature :ssh_identity,
"The provider supports a configurable SSH identity file"
-
+
feature :user,
"The provider can run as a different user"
@@ -135,6 +135,7 @@ Puppet::Type.newtype(:vcsrepo) do
newparam :user do
desc "The user to run for repository operations"
+ defaultto 'root'
end
newparam :excludes do
@@ -167,7 +168,7 @@ Puppet::Type.newtype(:vcsrepo) do
newparam :identity, :required_features => [:ssh_identity] do
desc "SSH identity file"
end
-
+
newparam :module, :required_features => [:modules] do
desc "The repository module to manage"
end