public class CherryPick extends SubmitStrategy
args
Modifier and Type | Method and Description |
---|---|
protected MergeTip |
_run(CodeReviewCommit branchTip,
Collection<CodeReviewCommit> toMerge) |
boolean |
dryRun(CodeReviewCommit mergeTip,
CodeReviewCommit toMerge)
Checks whether the given commit can be merged.
|
Map<com.google.gerrit.reviewdb.client.Change.Id,CodeReviewCommit> |
getNewCommits()
Returns all commits that have been newly created for the changes that are
getting merged.
|
getRefLogIdent, retryOnLockFailure, run, setRefLogIdent
protected MergeTip _run(CodeReviewCommit branchTip, Collection<CodeReviewCommit> toMerge) throws IntegrationException
_run
in class SubmitStrategy
IntegrationException
SubmitStrategy.run(CodeReviewCommit, Collection)
public Map<com.google.gerrit.reviewdb.client.Change.Id,CodeReviewCommit> getNewCommits()
SubmitStrategy
By default this method returns an empty map, but subclasses may override this method to provide any newly created commits.
This method may only be called after SubmitStrategy.run(CodeReviewCommit,
Collection)
.
getNewCommits
in class SubmitStrategy
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