net.sourceforge.cruisecontrol.sourcecontrols
Class Git

java.lang.Object
  extended bynet.sourceforge.cruisecontrol.sourcecontrols.Git
All Implemented Interfaces:
java.io.Serializable, SourceControl

public class Git
extends java.lang.Object
implements SourceControl

This class implements the SourceControl methods for a git repository. The call to git is assumed to work without any setup. This implies that authentication data must be available.

Author:
Robert Schiele
See Also:
git.or.cz, Serialized Form

Constructor Summary
Git()
           
 
Method Summary
 java.util.List getModifications(java.util.Date from, java.util.Date to)
          Returns a list of modifications detailing all the changes between the last build and the latest revision in the repository.
 java.util.Map getProperties()
          Any properties that have been set in this sourcecontrol.
 void setLocalWorkingCopy(java.lang.String d)
          Sets the local working copy to use when making calls to git.
 void setProperty(java.lang.String p)
           
 void setPropertyOnDelete(java.lang.String p)
           
 void validate()
          This method validates that the local working copy location has been specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Git

public Git()
Method Detail

getProperties

public java.util.Map getProperties()
Description copied from interface: SourceControl
Any properties that have been set in this sourcecontrol. Will be passed onto the Builder, which may then pass the properties to the underlying build implementation. For example, the Ant builder will define these properties so that the underlying Ant script can use them.

Specified by:
getProperties in interface SourceControl

setProperty

public void setProperty(java.lang.String p)

setPropertyOnDelete

public void setPropertyOnDelete(java.lang.String p)

setLocalWorkingCopy

public void setLocalWorkingCopy(java.lang.String d)
Sets the local working copy to use when making calls to git.

Parameters:
d - String indicating the relative or absolute path to the local working copy of the git repository of which to find the log history.

validate

public void validate()
              throws CruiseControlException
This method validates that the local working copy location has been specified.

Specified by:
validate in interface SourceControl
Throws:
CruiseControlException - Thrown when the local working copy location is null

getModifications

public java.util.List getModifications(java.util.Date from,
                                       java.util.Date to)
Returns a list of modifications detailing all the changes between the last build and the latest revision in the repository.

Specified by:
getModifications in interface SourceControl
Parameters:
from -
to -
Returns:
the list of modifications, or an empty list if we failed to retrieve the changes.