summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gerstmayr <andreas@andreasgerstmayr.at>2012-03-18 17:26:54 +0100
committerAndreas Gerstmayr <andreas@andreasgerstmayr.at>2012-03-18 17:26:54 +0100
commit0f362a13bfafdd14393bdd370e9d196540365837 (patch)
tree806ba1d2cb1ae916d537b8aa7c22ae0bd4917e8b
parenta63d0380a478344672fd1c05c2aafe19e75a8c54 (diff)
add begin/except for hg pull (mercurial 2.1 returns 1 for hg pull when no changes are found; this change gets reverted in mercurial 2.1.1)
-rw-r--r--lib/puppet/provider/vcsrepo/hg.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/puppet/provider/vcsrepo/hg.rb b/lib/puppet/provider/vcsrepo/hg.rb
index 54205c2..0be5e08 100644
--- a/lib/puppet/provider/vcsrepo/hg.rb
+++ b/lib/puppet/provider/vcsrepo/hg.rb
@@ -65,7 +65,10 @@ Puppet::Type.type(:vcsrepo).provide(:hg, :parent => Puppet::Provider::Vcsrepo) d
def revision=(desired)
at_path do
- hg('pull')
+ begin
+ hg('pull')
+ rescue
+ end
begin
hg('merge')
rescue Puppet::ExecutionFailure