Package sonia.scm.repository.api
Class RevertCommandBuilder
java.lang.Object
sonia.scm.repository.api.RevertCommandBuilder
Applies a revert of a chosen changeset onto the given repository/branch combination.
- Since:
- 3.8
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute()
Executes the revert with the given builder parameters.protected RevertCommandRequest
setAuthor
(DisplayUser author) Use this to set the author of the revert commit manually.This is an optional parameter.setMessage
(String message) This is an optional parameter.setRevision
(String revision) Obligatory value.
-
Constructor Details
-
RevertCommandBuilder
- Parameters:
command
- ARevertCommand
implementation provided by some source.
-
-
Method Details
-
setAuthor
Use this to set the author of the revert commit manually. If this is omitted, the currently logged-in user will be used instead. If the given user object does not have an email address, we will useEMail
to compute a fallback address.- Parameters:
author
- Author entity.- Returns:
- This instance.
-
setRevision
Obligatory value.- Parameters:
revision
- Identifier of the revision.- Returns:
- This instance.
-
setBranch
This is an optional parameter. Not every SCM system supports branches. If null or empty and supported by the SCM, the default branch of the repository shall be used.- Parameters:
branch
- Name of the branch.- Returns:
- This instance.
-
setMessage
This is an optional parameter. If null or empty, a default message will be set.- Parameters:
message
- Particular message.- Returns:
- This instance.
-
execute
Executes the revert with the given builder parameters.- Returns:
RevertCommandResult
with information about the executed revert.
-
getRequest
-