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)

This commit is contained in:
Andreas Gerstmayr 2012-03-18 17:26:54 +01:00
parent a63d0380a4
commit 0f362a13bf
1 changed files with 4 additions and 1 deletions

View 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