Reputation: 3999
I'm trying use puppet-vcsrepo to ensure that all my machines have the latest version of my code checked in from my hg repo. The first time I run my manifest, my code is successfully checked out, but every time puppet runs after that I get this error:
Could not evaluate: undefined method `latest?' for #<Puppet::Type::Vcsrepo::ProviderHg:0x7f830dc59cb0>
Here is the relevant part of my manifest:
vcsrepo {"/path/to/dir":
provider => hg,
ensure => 'present',
source => '[email protected]/source',
}
I'v tried using different revisions, or not specifying them at all as well as trying both ensure => present and ensure => latest. I'm just learning puppet, and am not very familiar with ruby, so any help would be greatly appreciated.
Upvotes: 1
Views: 1083
Reputation: 31
The problem could be your usage of revision => "HEAD"
. As far as i know HEAD is a git term. Just remove the revision part and you will get the latest version of your code by default.
README.HG.markdown:
To get the default branch tip:
vcsrepo { "/path/to/repo":
ensure => present,
provider => hg,
source => "http://hg.example.com/myrepo"
}
Upvotes: 2