Enum Class RejectedRefState

java.lang.Object
java.lang.Enum<RejectedRefState>
com.atlassian.bitbucket.repository.sync.RejectedRefState
All Implemented Interfaces:
Serializable, Comparable<RejectedRefState>, Constable

public enum RejectedRefState extends Enum<RejectedRefState>
Enumerates the possible reasons why a given ref may not be automatically synchronized with its upstream and, for each state, describes the actions which may be applied to synchronize the ref manually.
  • Enum Constant Details

    • AHEAD

      public static final RejectedRefState AHEAD
      Indicates the ref could not be synchronized because it is strictly ahead of its upstream. This means the ref already includes every commit reachable from its upstream ref, plus more.

      When the ref is ahead of its upstream, performing a merge will fail because there are no new commits to merge in. Only overwriting the ref can synchronize it with its upstream.

    • DIVERGED

      public static final RejectedRefState DIVERGED
      Indicates the ref could not be synchronized because it has diverged from its upstream. This means the ref and its upstream both include at least one commit which is not reachable from the other.

      When the ref has diverged from its upstream, performing a merge can synchronize the ref with its upstream by adding all the commits reachable from the ref's upstream but not from itself. The refs can, of course, also be synchronized by overwriting the ref.

    • ORPHANED

      public static final RejectedRefState ORPHANED
      Indicates the ref could not be synchronized because it was ahead of or diverged from its upstream and its upstream has been deleted. When an upstream ref is deleted, downstream refs are also deleted if, and only if, they reference the same commit as upstream. If they do not, meaning they are ahead or diverged, they cannot be removed automatically (as work may be lost). They are marked as orphaned instead.

      When a ref has been orphaned, "overwriting" the ref will delete it. No other synchronization actions make sense for an orphaned ref.

  • Method Details

    • values

      public static RejectedRefState[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RejectedRefState valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromId

      public static RejectedRefState fromId(int id)
    • getId

      public int getId()