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 Branch
defaultBranch
(String name, String revision) Deprecated.static Branch
defaultBranch
(String name, String revision, Long lastCommitDate) Deprecated.UsedefaultBranch(String, String, Long, Person)
instead to set the author of the last commit, too.static Branch
defaultBranch
(String name, String revision, Long lastCommitDate, Person lastCommitter) boolean
The 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.int
hashCode()
boolean
Flag whether this branch is configured as the default branch.boolean
isStale()
boolean
isValid()
Returns true if the object is valid.static Branch
normalBranch
(String name, String revision) Deprecated.UsenormalBranch(String, String, Long, Person)
instead to set the date of the last commit, too.static Branch
normalBranch
(String name, String revision, Long lastCommitDate) Deprecated.UsenormalBranch(String, String, Long, Person)
instead to set the author of the last commit, too.static Branch
normalBranch
(String name, String revision, Long lastCommitDate, Person lastCommitter) void
setStale
(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:Validateable
Returns true if the object is valid.- Specified by:
isValid
in 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.