summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.GIT.markdown9
-rw-r--r--spec/unit/puppet/provider/vcsrepo/hg_spec.rb2
2 files changed, 9 insertions, 2 deletions
diff --git a/README.GIT.markdown b/README.GIT.markdown
index 04ac05b..b63d90b 100644
--- a/README.GIT.markdown
+++ b/README.GIT.markdown
@@ -31,7 +31,7 @@ To get the current [master] HEAD:
source => "git://example.com/repo.git"
}
-For a specific revision (can be a commit SHA or tag):
+For a specific revision or branch (can be a commit SHA, tag or branch name):
vcsrepo { "/path/to/repo":
ensure => present,
@@ -47,6 +47,13 @@ For a specific revision (can be a commit SHA or tag):
revision => '1.1.2rc1'
}
+ vcsrepo { "/path/to/repo":
+ ensure => present,
+ provider => git,
+ source => 'git://example.com/repo.git',
+ revision => 'development'
+ }
+
For sources that use SSH (eg, `username@server:...`)
----------------------------------------------------
diff --git a/spec/unit/puppet/provider/vcsrepo/hg_spec.rb b/spec/unit/puppet/provider/vcsrepo/hg_spec.rb
index 53e5596..6f32d44 100644
--- a/spec/unit/puppet/provider/vcsrepo/hg_spec.rb
+++ b/spec/unit/puppet/provider/vcsrepo/hg_spec.rb
@@ -74,7 +74,7 @@ describe_provider :vcsrepo, :hg, :resource => {:path => '/tmp/vcsrepo'} do
context "when it is the same as the current SHA", :resource => {:revision => '34e6012c783a'} do
it "should return it" do
- provider.expects(:hg).with('tags').never
+ provider.expects(:hg).with('tags').returns(fixture(:hg_tags))
provider.revision.should == resource.value(:revision)
end
end