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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Revision(org.eclipse.jgit.lib.ObjectId sha1)
Constructor for Revision.Revision(org.eclipse.jgit.lib.ObjectId sha1, Collection<Branch> branches)
Constructor for Revision.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Revision
clone()
boolean
containsBranchName(String name)
Returns whether the revision contains the specified branch.boolean
equals(Object obj)
Collection<Branch>
getBranches()
Getter for the fieldbranches
.org.eclipse.jgit.lib.ObjectId
getSha1()
Getter for the fieldsha1
.String
getSha1String()
getSha1String.int
hashCode()
void
setBranches(Collection<Branch> branches)
Setter for the fieldbranches
.void
setSha1(org.eclipse.jgit.lib.ObjectId sha1)
Setter for the fieldsha1
.String
toString()
-
-
-
Constructor Detail
-
Revision
public Revision(org.eclipse.jgit.lib.ObjectId sha1)
Constructor for Revision.- Parameters:
sha1
- aObjectId
object.
-
Revision
public Revision(org.eclipse.jgit.lib.ObjectId sha1, Collection<Branch> branches)
Constructor for Revision.- Parameters:
sha1
- aObjectId
object.branches
- aCollection
object.
-
-
Method Detail
-
getSha1
public org.eclipse.jgit.lib.ObjectId getSha1()
Getter for the fieldsha1
.- Returns:
- a
ObjectId
object.
-
getSha1String
@Exported(name="SHA1") public String 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
@Exported(name="branch") public Collection<Branch> getBranches()
Getter for the fieldbranches
.- Returns:
- a
Collection
object.
-
setBranches
public void setBranches(Collection<Branch> branches)
Setter for the fieldbranches
.- Parameters:
branches
- aCollection
object.
-
containsBranchName
public boolean containsBranchName(String name)
Returns whether the revision contains the specified branch.- Parameters:
name
- the name of the branch- Returns:
- whether the revision contains the branch
-
-