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 Revisionclone()booleancontainsBranchName(String name)Returns whether the revision contains the specified branch.booleanequals(Object obj)Collection<Branch>getBranches()Getter for the fieldbranches.org.eclipse.jgit.lib.ObjectIdgetSha1()Getter for the fieldsha1.StringgetSha1String()getSha1String.inthashCode()voidsetBranches(Collection<Branch> branches)Setter for the fieldbranches.voidsetSha1(org.eclipse.jgit.lib.ObjectId sha1)Setter for the fieldsha1.StringtoString()
-
-
-
Constructor Detail
-
Revision
public Revision(org.eclipse.jgit.lib.ObjectId sha1)
Constructor for Revision.- Parameters:
sha1- aObjectIdobject.
-
Revision
public Revision(org.eclipse.jgit.lib.ObjectId sha1, Collection<Branch> branches)Constructor for Revision.- Parameters:
sha1- aObjectIdobject.branches- aCollectionobject.
-
-
Method Detail
-
getSha1
public org.eclipse.jgit.lib.ObjectId getSha1()
Getter for the fieldsha1.- Returns:
- a
ObjectIdobject.
-
getSha1String
@Exported(name="SHA1") public String getSha1String()
getSha1String.- Returns:
- a
Stringobject.
-
setSha1
public void setSha1(org.eclipse.jgit.lib.ObjectId sha1)
Setter for the fieldsha1.- Parameters:
sha1- aObjectIdobject.
-
getBranches
@Exported(name="branch") public Collection<Branch> getBranches()
Getter for the fieldbranches.- Returns:
- a
Collectionobject.
-
setBranches
public void setBranches(Collection<Branch> branches)
Setter for the fieldbranches.- Parameters:
branches- aCollectionobject.
-
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
-
-