public class RebaseChange
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
canRebase(ChangeResource r) |
boolean |
canRebase(com.google.gerrit.reviewdb.client.Project.NameKey project,
com.google.gerrit.reviewdb.client.PatchSet.Id patchSetId,
com.google.gerrit.reviewdb.client.Branch.NameKey branch) |
boolean |
canRebase(RevisionResource r) |
void |
rebase(com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.reviewdb.client.PatchSet.Id patchSetId,
IdentifiedUser uploader,
java.lang.String newBaseRev)
Rebases the change of the given patch set.
|
com.google.gerrit.reviewdb.client.PatchSet |
rebase(org.eclipse.jgit.lib.Repository git,
org.eclipse.jgit.revwalk.RevWalk revWalk,
org.eclipse.jgit.lib.ObjectInserter inserter,
com.google.gerrit.reviewdb.client.PatchSet.Id patchSetId,
com.google.gerrit.reviewdb.client.Change change,
IdentifiedUser uploader,
org.eclipse.jgit.revwalk.RevCommit baseCommit,
MergeUtil mergeUtil,
org.eclipse.jgit.lib.PersonIdent committerIdent,
boolean runHooks,
PatchSetInserter.ValidatePolicy validate)
Rebases the change of the given patch set on the given base commit.
|
public void rebase(com.google.gerrit.reviewdb.client.Change change, com.google.gerrit.reviewdb.client.PatchSet.Id patchSetId, IdentifiedUser uploader, java.lang.String newBaseRev) throws NoSuchChangeException, com.google.gerrit.common.errors.EmailException, com.google.gwtorm.server.OrmException, java.io.IOException, InvalidChangeOperationException
change
- the change to perform the rebase forpatchSetId
- the id of the patch setuploader
- the user that creates the rebased patch setnewBaseRev
- the commit that should be the new baseNoSuchChangeException
- thrown if the change to which the patch set
belongs does not exist or is not visible to the usercom.google.gerrit.common.errors.EmailException
- thrown if sending the e-mail to notify about the new
patch set failscom.google.gwtorm.server.OrmException
- thrown in case accessing the database failsjava.io.IOException
- thrown if rebase is not possible or not neededInvalidChangeOperationException
- thrown if rebase is not allowedpublic com.google.gerrit.reviewdb.client.PatchSet rebase(org.eclipse.jgit.lib.Repository git, org.eclipse.jgit.revwalk.RevWalk revWalk, org.eclipse.jgit.lib.ObjectInserter inserter, com.google.gerrit.reviewdb.client.PatchSet.Id patchSetId, com.google.gerrit.reviewdb.client.Change change, IdentifiedUser uploader, org.eclipse.jgit.revwalk.RevCommit baseCommit, MergeUtil mergeUtil, org.eclipse.jgit.lib.PersonIdent committerIdent, boolean runHooks, PatchSetInserter.ValidatePolicy validate) throws NoSuchChangeException, com.google.gwtorm.server.OrmException, java.io.IOException, InvalidChangeOperationException, MergeConflictException
git
- the repositoryrevWalk
- the RevWalkinserter
- the object inserterpatchSetId
- the id of the patch setchange
- the change that should be rebaseduploader
- the user that creates the rebased patch setbaseCommit
- the commit that should be the new basemergeUtil
- merge utilities for the destination projectcommitterIdent
- the committer's identityrunHooks
- if hooks should be run for the new patch setvalidate
- if commit validation should be run for the new patch setNoSuchChangeException
- thrown if the change to which the patch set
belongs does not exist or is not visible to the usercom.google.gwtorm.server.OrmException
- thrown in case accessing the database failsjava.io.IOException
- thrown if rebase is not possible or not neededInvalidChangeOperationException
- thrown if rebase is not allowedMergeConflictException
public boolean canRebase(ChangeResource r)
public boolean canRebase(RevisionResource r)
public boolean canRebase(com.google.gerrit.reviewdb.client.Project.NameKey project, com.google.gerrit.reviewdb.client.PatchSet.Id patchSetId, com.google.gerrit.reviewdb.client.Branch.NameKey branch)