Class SCMRevision

java.lang.Object
jenkins.scm.api.SCMRevision
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ChangeRequestSCMRevision

@ExportedBean public abstract class SCMRevision extends Object implements Serializable
Base class that represents a specific (or not so specific) revision of a SCMHead.
See Also:
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract boolean
    final SCMHead
    Returns the SCMHead that this SCMRevision belongs to.
    abstract int
    boolean
    Returns true if and only if this revision is deterministic, in other words that repeated checkouts of this revision will result in the exact same files being checked out.
    Should provide a concise, human-readable summary of this revision in an implementation-dependent format.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SCMRevision

      protected SCMRevision(@NonNull SCMHead head)
      Constructor.
      Parameters:
      head - the SCMHead that the SCMRevision belongs to.
  • Method Details

    • equals

      public abstract boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public abstract int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Should provide a concise, human-readable summary of this revision in an implementation-dependent format.

      Overrides:
      toString in class Object
    • isDeterministic

      @Exported public boolean isDeterministic()
      Returns true if and only if this revision is deterministic, in other words that repeated checkouts of this revision will result in the exact same files being checked out. Most modern SCM systems have a deterministic revision, however some of the older ones do not have a deterministic revision for all types of head.
      Returns:
      true if and only if this revision is deterministic.
    • getHead

      @Exported @NonNull public final SCMHead getHead()
      Returns the SCMHead that this SCMRevision belongs to.
      Returns:
      the SCMHead that this SCMRevision belongs to.