summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2011-08-29 01:15:51 -0700
committerJames Turnbull <james@lovedthanlost.net>2011-08-29 01:15:51 -0700
commit4a89ed4d3b8348a53e2f27429b59a28c81b29fd3 (patch)
tree9fe7d7a38b9c0547ab5460e6ac01ccb2b3fb5f4f /lib
parent18d4cf890c01e756c05cdf4e40972a4b0b229d66 (diff)
downloadpuppet-vcsrepo-4a89ed4d3b8348a53e2f27429b59a28c81b29fd3.tar.gz
puppet-vcsrepo-4a89ed4d3b8348a53e2f27429b59a28c81b29fd3.tar.bz2
Fixed Bug #9219 - vcsrepo updates too often
If vcsrepo is used with ensure => latest to keep something from a larger repository checked out it will trigger an update every time something changes anywhere in the repository, not just in the part that’s actually checked out. In combination with a busy development team and a vcsrepo resource with notify => Service[foo] this means frequent restarts of a service for no good reason. The attached patch solves the issue by looking at the “Last Changed Rev” line from svn info instead of “Revision”. Patch thanks to: Knut Arne Bjørndal
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/provider/vcsrepo/svn.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/provider/vcsrepo/svn.rb b/lib/puppet/provider/vcsrepo/svn.rb
index 5590a71..6ec4612 100644
--- a/lib/puppet/provider/vcsrepo/svn.rb
+++ b/lib/puppet/provider/vcsrepo/svn.rb
@@ -55,14 +55,14 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo)
def latest
args = buildargs.push('info', '-r', 'HEAD')
at_path do
- svn(*args)[/^Revision:\s+(\d+)/m, 1]
+ svn(*args)[/^Last Changed Rev:\s+(\d+)/m, 1]
end
end
def revision
args = buildargs.push('info')
at_path do
- svn(*args)[/^Revision:\s+(\d+)/m, 1]
+ svn(*args)[/^Last Changed Rev:\s+(\d+)/m, 1]
end
end