Class CherryPickChange
- java.lang.Object
-
- com.google.gerrit.server.restapi.change.CherryPickChange
-
public class CherryPickChange extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.gerrit.server.restapi.change.CherryPickChange.Result
cherryPick(BatchUpdate.Factory batchUpdateFactory, Change change, PatchSet patch, CherryPickInput input, BranchNameKey dest)
This function is used for cherry picking a change.com.google.gerrit.server.restapi.change.CherryPickChange.Result
cherryPick(BatchUpdate.Factory batchUpdateFactory, Change sourceChange, Project.NameKey project, org.eclipse.jgit.lib.ObjectId sourceCommit, CherryPickInput input, BranchNameKey dest)
This function is called directly to cherry pick a commit.com.google.gerrit.server.restapi.change.CherryPickChange.Result
cherryPick(BatchUpdate.Factory batchUpdateFactory, Change sourceChange, Project.NameKey project, org.eclipse.jgit.lib.ObjectId sourceCommit, CherryPickInput input, BranchNameKey dest, String topic, Change.Id revertedChange, org.eclipse.jgit.lib.ObjectId changeIdForNewChange)
This function can be called directly to cherry-pick a change (or commit if sourceChange is null) with a few other parameters that are especially useful for cherry-picking a commit that is the revert-of another change.
-
-
-
Method Detail
-
cherryPick
public com.google.gerrit.server.restapi.change.CherryPickChange.Result cherryPick(BatchUpdate.Factory batchUpdateFactory, Change change, PatchSet patch, CherryPickInput input, BranchNameKey dest) throws IOException, InvalidChangeOperationException, IntegrationException, UpdateException, RestApiException, org.eclipse.jgit.errors.ConfigInvalidException, NoSuchProjectException
This function is used for cherry picking a change.- Parameters:
batchUpdateFactory
- Used for applying changes to the database.change
- Change to cherry pick.patch
- The patch of that change.input
- Input object for different configurations of cherry pick.dest
- Destination branch for the cherry pick.- Returns:
- Result object that describes the cherry pick.
- Throws:
IOException
- Unable to open repository or read from the database.InvalidChangeOperationException
- Parent or branch don't exist, or two changes with same key exist in the branch.IntegrationException
- Merge conflict or trees are identical after cherry pick.UpdateException
- Problem updating the database using batchUpdateFactory.RestApiException
- Error such as invalid SHA1org.eclipse.jgit.errors.ConfigInvalidException
- Can't find account to notify.NoSuchProjectException
- Can't find project state.
-
cherryPick
public com.google.gerrit.server.restapi.change.CherryPickChange.Result cherryPick(BatchUpdate.Factory batchUpdateFactory, Change sourceChange, Project.NameKey project, org.eclipse.jgit.lib.ObjectId sourceCommit, CherryPickInput input, BranchNameKey dest) throws IOException, InvalidChangeOperationException, IntegrationException, UpdateException, RestApiException, org.eclipse.jgit.errors.ConfigInvalidException, NoSuchProjectException
This function is called directly to cherry pick a commit. Also, it is used to cherry pick a change as well as long as sourceChange is not null.- Parameters:
batchUpdateFactory
- Used for applying changes to the database.sourceChange
- Change to cherry pick. Can be null, and then the function will only cherry pick a commit.project
- Project namesourceCommit
- Id of the commit to be cherry picked.input
- Input object for different configurations of cherry pick.dest
- Destination branch for the cherry pick.- Returns:
- Result object that describes the cherry pick.
- Throws:
IOException
- Unable to open repository or read from the database.InvalidChangeOperationException
- Parent or branch don't exist, or two changes with same key exist in the branch.IntegrationException
- Merge conflict or trees are identical after cherry pick.UpdateException
- Problem updating the database using batchUpdateFactory.RestApiException
- Error such as invalid SHA1org.eclipse.jgit.errors.ConfigInvalidException
- Can't find account to notify.NoSuchProjectException
- Can't find project state.
-
cherryPick
public com.google.gerrit.server.restapi.change.CherryPickChange.Result cherryPick(BatchUpdate.Factory batchUpdateFactory, Change sourceChange, Project.NameKey project, org.eclipse.jgit.lib.ObjectId sourceCommit, CherryPickInput input, BranchNameKey dest, String topic, Change.Id revertedChange, org.eclipse.jgit.lib.ObjectId changeIdForNewChange) throws IOException, InvalidChangeOperationException, IntegrationException, UpdateException, RestApiException, org.eclipse.jgit.errors.ConfigInvalidException, NoSuchProjectException
This function can be called directly to cherry-pick a change (or commit if sourceChange is null) with a few other parameters that are especially useful for cherry-picking a commit that is the revert-of another change.- Parameters:
batchUpdateFactory
- Used for applying changes to the database.sourceChange
- Change to cherry pick. Can be null, and then the function will only cherry pick a commit.project
- Project namesourceCommit
- Id of the commit to be cherry picked.input
- Input object for different configurations of cherry pick.dest
- Destination branch for the cherry pick.topic
- Topic name for the change created.revertedChange
- The id of the change that is reverted. This is used for the "revertOf" field to mark the created cherry pick change as "revertOf" the original change that was reverted.changeIdForNewChange
- The Change-Id that the new change that of the cherry pick will have.- Returns:
- Result object that describes the cherry pick.
- Throws:
IOException
- Unable to open repository or read from the database.InvalidChangeOperationException
- Parent or branch don't exist, or two changes with same key exist in the branch.IntegrationException
- Merge conflict or trees are identical after cherry pick.UpdateException
- Problem updating the database using batchUpdateFactory.RestApiException
- Error such as invalid SHA1org.eclipse.jgit.errors.ConfigInvalidException
- Can't find account to notify.NoSuchProjectException
- Can't find project state.
-
-