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
ConstructorDescriptionRevision
(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()
boolean
containsBranchName
(String name) Returns whether the revision contains the specified branch.boolean
Getter for the fieldbranches
.org.eclipse.jgit.lib.ObjectId
getSha1()
Getter for the fieldsha1
.getSha1String.int
hashCode()
void
setBranches
(Collection<Branch> branches) Setter for the fieldbranches
.void
setSha1
(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
- aObjectId
object.
-
Revision
Constructor for Revision.- Parameters:
sha1
- aObjectId
object.branches
- aCollection
object.
-
-
Method Details
-
getSha1
public org.eclipse.jgit.lib.ObjectId getSha1()Getter for the fieldsha1
.- Returns:
- a
ObjectId
object.
-
getSha1String
getSha1String.- Returns:
- a
String
object.
-
setSha1
public void setSha1(org.eclipse.jgit.lib.ObjectId sha1) Setter for the fieldsha1
.- Parameters:
sha1
- aObjectId
object.
-
getBranches
Getter for the fieldbranches
.- Returns:
- a
Collection
object.
-
setBranches
Setter for the fieldbranches
.- Parameters:
branches
- aCollection
object.
-
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
-