Package hudson.plugins.git
Class Revision
java.lang.Object
hudson.plugins.git.Revision
- All Implemented Interfaces:
Serializable,Cloneable
@ExportedBean(defaultVisibility=999)
public class Revision
extends Object
implements Serializable, Cloneable
SHA1 in the object tree and the collection of branches that
share this SHA1. Unlike other SCMs, git can have >1 branches point at the
_same_ commit.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRevision(org.eclipse.jgit.lib.ObjectId sha1) Constructor for Revision.Revision(org.eclipse.jgit.lib.ObjectId sha1, Collection<Branch> branches) Constructor for Revision. -
Method Summary
Modifier and TypeMethodDescriptionclone()booleancontainsBranchName(String name) Returns whether the revision contains the specified branch.booleanGetter for the fieldbranches.org.eclipse.jgit.lib.ObjectIdgetSha1()Getter for the fieldsha1.getSha1String.inthashCode()voidsetBranches(Collection<Branch> branches) Setter for the fieldbranches.voidsetSha1(org.eclipse.jgit.lib.ObjectId sha1) Setter for the fieldsha1.toString()
-
Constructor Details
-
Revision
public Revision(org.eclipse.jgit.lib.ObjectId sha1) Constructor for Revision.- Parameters:
sha1- aObjectIdobject.
-
Revision
Constructor for Revision.- Parameters:
sha1- aObjectIdobject.branches- aCollectionobject.
-
-
Method Details
-
getSha1
public org.eclipse.jgit.lib.ObjectId getSha1()Getter for the fieldsha1.- Returns:
- a
ObjectIdobject.
-
getSha1String
getSha1String.- Returns:
- a
Stringobject.
-
setSha1
public void setSha1(org.eclipse.jgit.lib.ObjectId sha1) Setter for the fieldsha1.- Parameters:
sha1- aObjectIdobject.
-
getBranches
Getter for the fieldbranches.- Returns:
- a
Collectionobject.
-
setBranches
Setter for the fieldbranches.- Parameters:
branches- aCollectionobject.
-
containsBranchName
Returns whether the revision contains the specified branch.- Parameters:
name- the name of the branch- Returns:
- whether the revision contains the branch
-
toString
-
clone
-
hashCode
public int hashCode() -
equals
-