From a14da4fc175649adaa2aa2a37465e5cd3fc7fccb Mon Sep 17 00:00:00 2001 From: Aaron Stone Date: Thu, 25 Jul 2013 09:24:51 -0700 Subject: Handle revision update without source switch. --- lib/puppet/provider/vcsrepo/svn.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/puppet/provider') 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 -- cgit v1.2.3