public class FastForwardOnly extends SubmitStrategy
args
Modifier and Type | Method and Description |
---|---|
protected MergeTip |
_run(CodeReviewCommit branchTip,
java.util.Collection<CodeReviewCommit> toMerge) |
boolean |
dryRun(CodeReviewCommit mergeTip,
CodeReviewCommit toMerge)
Checks whether the given commit can be merged.
|
boolean |
retryOnLockFailure()
Returns whether a merge that failed with
RefUpdate.Result.LOCK_FAILURE should
be retried. |
getNewCommits, getRefLogIdent, run, setRefLogIdent
protected MergeTip _run(CodeReviewCommit branchTip, java.util.Collection<CodeReviewCommit> toMerge) throws IntegrationException
_run
in class SubmitStrategy
IntegrationException
SubmitStrategy.run(CodeReviewCommit, Collection)
public boolean retryOnLockFailure()
SubmitStrategy
RefUpdate.Result.LOCK_FAILURE
should
be retried.
May be overridden by subclasses.
retryOnLockFailure
in class SubmitStrategy
true
if a merge that failed with
RefUpdate.Result.LOCK_FAILURE
should be retried, otherwise
false
public boolean dryRun(CodeReviewCommit mergeTip, CodeReviewCommit toMerge) throws IntegrationException
SubmitStrategy
Implementations must ensure that invoking this method modifies neither the git repository nor the Gerrit database.
dryRun
in class SubmitStrategy
mergeTip
- the merge tip.toMerge
- the commit that should be checked.true
if the given commit can be merged, otherwise
false
IntegrationException