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/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
4 files changed, 10 insertions, 11 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