public class RebaseUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RebaseUtil.Base |
Modifier and Type | Method and Description |
---|---|
boolean |
canRebase(PatchSet patchSet,
Branch.NameKey dest,
org.eclipse.jgit.lib.Repository git,
org.eclipse.jgit.revwalk.RevWalk rw) |
org.eclipse.jgit.lib.ObjectId |
findBaseRevision(PatchSet patchSet,
Branch.NameKey destBranch,
org.eclipse.jgit.lib.Repository git,
org.eclipse.jgit.revwalk.RevWalk rw)
Find the commit onto which a patch set should be rebased.
|
RebaseUtil.Base |
parseBase(RevisionResource rsrc,
java.lang.String base) |
public boolean canRebase(PatchSet patchSet, Branch.NameKey dest, org.eclipse.jgit.lib.Repository git, org.eclipse.jgit.revwalk.RevWalk rw)
public RebaseUtil.Base parseBase(RevisionResource rsrc, java.lang.String base) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public org.eclipse.jgit.lib.ObjectId findBaseRevision(PatchSet patchSet, Branch.NameKey destBranch, org.eclipse.jgit.lib.Repository git, org.eclipse.jgit.revwalk.RevWalk rw) throws RestApiException, java.io.IOException, com.google.gwtorm.server.OrmException
This is defined as the latest patch set of the change corresponding to this commit's parent, or the destination branch tip in the case where the parent's change is merged.
patchSet
- patch set for which the new base commit should be found.destBranch
- the destination branch.git
- the repository.rw
- the RevWalk.RestApiException
- if rebase is not possible.java.io.IOException
- if accessing the repository fails.com.google.gwtorm.server.OrmException
- if accessing the database fails.