Package com.google.gerrit.server.submit
Class SubmitStrategy
java.lang.Object
com.google.gerrit.server.submit.SubmitStrategy
- Direct Known Subclasses:
CherryPick
,FastForwardOnly
,MergeAlways
,MergeIfNecessary
,RebaseSubmitStrategy
Base class that submit strategies must extend.
A submit strategy for a certain SubmitType
defines how the submitted commits should be
merged.
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
addOps
(BatchUpdate bu, Set<CodeReviewCommit> toMerge) Add operations to a batch update that execute this submit strategy.protected abstract com.google.common.collect.ImmutableList
<com.google.gerrit.server.submit.SubmitStrategyOp> buildOps
(Collection<CodeReviewCommit> toMerge) Returns the updated changed after this submit strategy has been executed.static com.google.inject.Module
module()
-
Method Details
-
module
public static com.google.inject.Module module() -
getUpdatedChanges
Returns the updated changed after this submit strategy has been executed.- Returns:
- the updated changes after this submit strategy has been executed
-
addOps
Add operations to a batch update that execute this submit strategy.Guarantees exactly one op is added to the update for each change in the input set.
- Parameters:
bu
- batch update to add operations to.toMerge
- the set of submitted commits that should be merged using this submit strategy. Implementations are responsible for ordering of commits, and will not modify the input in place.
-
buildOps
protected abstract com.google.common.collect.ImmutableList<com.google.gerrit.server.submit.SubmitStrategyOp> buildOps(Collection<CodeReviewCommit> toMerge)
-