Class 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 Detail

      • Revision

        public Revision​(org.eclipse.jgit.lib.ObjectId sha1)
        Constructor for Revision.
        Parameters:
        sha1 - a ObjectId object.
      • Revision

        public Revision​(org.eclipse.jgit.lib.ObjectId sha1,
                        Collection<Branch> branches)
        Constructor for Revision.
        Parameters:
        sha1 - a ObjectId object.
        branches - a Collection object.
    • Method Detail

      • getSha1

        public org.eclipse.jgit.lib.ObjectId getSha1()
        Getter for the field sha1.
        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 field sha1.
        Parameters:
        sha1 - a ObjectId object.
      • getBranches

        @Exported(name="branch")
        public Collection<Branch> getBranches()
        Getter for the field branches.
        Returns:
        a Collection object.
      • setBranches

        public void setBranches​(Collection<Branch> branches)
        Setter for the field branches.
        Parameters:
        branches - a Collection 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object