add begin/except for hg pull (mercurial 2.1 returns 1 for hg pull when no changes...
authorAndreas Gerstmayr <andreas@andreasgerstmayr.at>
Sun, 18 Mar 2012 16:26:54 +0000 (17:26 +0100)
committerAndreas Gerstmayr <andreas@andreasgerstmayr.at>
Sun, 18 Mar 2012 16:26:54 +0000 (17:26 +0100)
lib/puppet/provider/vcsrepo/hg.rb

index 54205c2..0be5e08 100644 (file)
@@ -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