Package sonia.scm.repository
Class Branch
java.lang.Object
sonia.scm.repository.Branch
- All Implemented Interfaces:
Serializable,Validateable
Represents a branch in a repository.
- Since:
- 1.18
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic BranchdefaultBranch(String name, String revision) Deprecated.static BranchdefaultBranch(String name, String revision, Long lastCommitDate) Deprecated.UsedefaultBranch(String, String, Long, Person)instead to set the author of the last commit, too.static BranchdefaultBranch(String name, String revision, Long lastCommitDate, Person lastCommitter) booleanThe date of the commit this branch points to, if this was computed (can be empty).The author of the last commit this branch points to.getName()Returns the name of the branchReturns the latest revision of the branch.inthashCode()booleanFlag whether this branch is configured as the default branch.booleanisStale()booleanisValid()Returns true if the object is valid.static BranchnormalBranch(String name, String revision) Deprecated.UsenormalBranch(String, String, Long, Person)instead to set the date of the last commit, too.static BranchnormalBranch(String name, String revision, Long lastCommitDate) Deprecated.UsenormalBranch(String, String, Long, Person)instead to set the author of the last commit, too.static BranchnormalBranch(String name, String revision, Long lastCommitDate, Person lastCommitter) voidsetStale(boolean stale) toString()
-
Field Details
-
VALID_BRANCH_NAMES
- See Also:
-
VALID_BRANCH_NAME_PATTERN
-
-
Method Details
-
normalBranch
Deprecated.UsenormalBranch(String, String, Long, Person)instead to set the date of the last commit, too. -
normalBranch
Deprecated.UsenormalBranch(String, String, Long, Person)instead to set the author of the last commit, too. -
normalBranch
-
defaultBranch
Deprecated.UsedefaultBranch(String, String, Long)instead to set the date of the last commit, too. -
defaultBranch
Deprecated.UsedefaultBranch(String, String, Long, Person)instead to set the author of the last commit, too. -
defaultBranch
-
setStale
public void setStale(boolean stale) -
isValid
public boolean isValid()Description copied from interface:ValidateableReturns true if the object is valid.- Specified by:
isValidin interfaceValidateable
-
equals
-
hashCode
public int hashCode() -
toString
-
getName
Returns the name of the branch- Returns:
- name of the branch
-
getRevision
Returns the latest revision of the branch.- Returns:
- latest revision of branch
-
isDefaultBranch
public boolean isDefaultBranch()Flag whether this branch is configured as the default branch. -
getLastCommitDate
The date of the commit this branch points to, if this was computed (can be empty).- Since:
- 2.11.0
-
getLastCommitter
The author of the last commit this branch points to.- Since:
- 2.28.0
-
isStale
public boolean isStale()
-
defaultBranch(String, String, Long)instead to set the date of the last commit, too.