summaryrefslogtreecommitdiff
path: root/lib/puppet/provider
diff options
context:
space:
mode:
authorAaron Stone <aaron@serendipity.cx>2013-07-25 09:24:51 -0700
committerAaron Stone <aaron@serendipity.cx>2013-07-25 13:57:42 -0700
commita14da4fc175649adaa2aa2a37465e5cd3fc7fccb (patch)
tree79c3760635cf6defe29be5238f4456aa6c58c280 /lib/puppet/provider
parentc281f10efde83847f4df822010c32e03cda809b7 (diff)
downloadpuppet-vcsrepo-a14da4fc175649adaa2aa2a37465e5cd3fc7fccb.tar.gz
puppet-vcsrepo-a14da4fc175649adaa2aa2a37465e5cd3fc7fccb.tar.bz2
Handle revision update without source switch.
Diffstat (limited to 'lib/puppet/provider')
-rw-r--r--lib/puppet/provider/vcsrepo/svn.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/provider/vcsrepo/svn.rb b/lib/puppet/provider/vcsrepo/svn.rb
index 9de0812..bfc9b76 100644
--- a/lib/puppet/provider/vcsrepo/svn.rb
+++ b/lib/puppet/provider/vcsrepo/svn.rb
@@ -85,7 +85,11 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo)
end
def revision=(desired)
- args = buildargs.push('switch', '-r', desired, @resource.value(:source))
+ args = if @resource.value(:source)
+ buildargs.push('switch', '-r', desired, @resource.value(:source))
+ else
+ buildargs.push('update', '-r', desired)
+ end
at_path do
svn(*args)
end