fix undefined method 'working_copy_exists?' error for ProviderHg
This commit is contained in:
		
				
					committed by
					
						
						James Turnbull
					
				
			
			
				
	
			
			
			
						parent
						
							d6f233e759
						
					
				
				
					commit
					ca531df00f
				
			@@ -15,14 +15,18 @@ Puppet::Type.type(:vcsrepo).provide(:hg, :parent => Puppet::Provider::Vcsrepo) d
 | 
				
			|||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def exists?
 | 
					  def working_copy_exists?
 | 
				
			||||||
    File.directory?(File.join(@resource.value(:path), '.hg'))
 | 
					    File.directory?(File.join(@resource.value(:path), '.hg'))
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  def exists?
 | 
				
			||||||
 | 
					    working_copy_exists?
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def destroy
 | 
					  def destroy
 | 
				
			||||||
    FileUtils.rm_rf(@resource.value(:path))
 | 
					    FileUtils.rm_rf(@resource.value(:path))
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
  
 | 
					
 | 
				
			||||||
  def revision
 | 
					  def revision
 | 
				
			||||||
    at_path do
 | 
					    at_path do
 | 
				
			||||||
      current = hg('parents')[/^changeset:\s+(?:-?\d+):(\S+)/m, 1]
 | 
					      current = hg('parents')[/^changeset:\s+(?:-?\d+):(\S+)/m, 1]
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user