buratino 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/buratino/hg.rb CHANGED
@@ -50,8 +50,15 @@ module Buratino
50
50
  puts "DEBUG BURATINO::HG::SEND_REPORTS"
51
51
  message = "New report from #{Facter.fqdn}"
52
52
  Mercurial::Shell.run("add", :append_hg => true, :in => config['reports_dir'])
53
- Mercurial::Shell.run(["commit -m ?", message], :append_hg => true, :in => config['reports_dir'])
54
- Mercurial::Shell.run("push", :append_hg => true, :in => config['reports_dir'])
53
+ begin
54
+ Mercurial::Shell.run(["commit -m ?", message], :append_hg => true, :in => config['reports_dir'])
55
+ Mercurial::Shell.run("push", :append_hg => true, :in => config['reports_dir'])
56
+ rescue Mercurial::CommandError => errmsg
57
+ puts "Something wrong...trying update(pull --update) first"
58
+ reports_repos = Mercurial::Repository.open( config['reports_dir'] )
59
+ reports_repos.pull( 'default', '--update')
60
+ retry
61
+ end
55
62
  end
56
63
 
57
64
  end
@@ -1,3 +1,3 @@
1
1
  module Buratino
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buratino
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-23 00:00:00.000000000 Z
12
+ date: 2012-05-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mercurial-ruby