Commits

Joe Passavanti  committed 4c61919

allow for multiple calls to hg per run

  • Participants
  • Parent commits 6eaab05

Comments (0)

Files changed (1)

File cookbooks/hg/providers/default.rb

 action :sync do
-  execute "clone repository" do    
+  execute "sync repository #{new_resource.path}" do    
     not_if "hg identify #{new_resource.path}"
     command "hg clone -e 'ssh -i #{new_resource.key} -o StrictHostKeyChecking=no' -r #{new_resource.reference} #{new_resource.repository} #{new_resource.path}"
   end
-  execute "pull changes" do
+  execute "pull changes #{new_resource.path}" do
       command "cd #{new_resource.path} && hg pull -e 'ssh -i #{new_resource.key} -o StrictHostKeyChecking=no' -r #{new_resource.reference} #{new_resource.repository}"
   end
-  execute "update" do
+  execute "update #{new_resource.path}" do
       command "cd #{new_resource.path} && hg update -r #{new_resource.reference}"
   end
-  execute "update owner" do
+  execute "sync update owner #{new_resource.path}" do
     command "chown -R #{new_resource.owner}:#{new_resource.group} #{new_resource.path}"
   end
-  execute "update permissions" do
+  execute "sync update permissions #{new_resource.path}" do
     command "chmod -R #{new_resource.mode} #{new_resource.path}"
   end
 end
  
 action :clone do
-  execute "clone repository" do
+  execute "clone repository #{new_resource.path}" do
     not_if "hg identify #{new_resource.path}"
     command "hg clone -e 'ssh -i #{new_resource.key} -o StrictHostKeyChecking=no' -r #{new_resource.reference} #{new_resource.repository} #{new_resource.path}"
   end
-  execute "update owner" do
+  execute "update owner #{new_resource.path}" do
     command "chown -R #{new_resource.owner}:#{new_resource.group} #{new_resource.path}"
   end
-  execute "update permissions" do
+  execute "update permissions #{new_resource.path}" do
     command "chmod -R #{new_resource.mode} #{new_resource.path}"
   end
 end