public class PatchSetUtil extends Object
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableCollection<PatchSet> |
byChange(ChangeNotes notes) |
com.google.common.collect.ImmutableMap<PatchSet.Id,PatchSet> |
byChangeAsMap(ChangeNotes notes) |
void |
checkPatchSetNotLocked(ChangeNotes notes)
Check if the current patch set of the change is locked.
|
PatchSet |
current(ChangeNotes notes) |
PatchSet |
get(ChangeNotes notes,
PatchSet.Id psId) |
com.google.common.collect.ImmutableMap<PatchSet.Id,PatchSet> |
getAsMap(ChangeNotes notes,
Set<PatchSet.Id> patchSetIds) |
org.eclipse.jgit.revwalk.RevCommit |
getRevCommit(Project.NameKey project,
PatchSet patchSet)
Returns the commit for the given project at the given patchset revision
|
PatchSet |
insert(org.eclipse.jgit.revwalk.RevWalk rw,
ChangeUpdate update,
PatchSet.Id psId,
org.eclipse.jgit.lib.ObjectId commit,
List<String> groups,
String pushCertificate,
String description) |
boolean |
isPatchSetLocked(ChangeNotes notes)
Is the current patch set locked against state changes?
|
void |
setGroups(ChangeUpdate update,
PatchSet ps,
List<String> groups) |
public PatchSet current(ChangeNotes notes)
public PatchSet get(ChangeNotes notes, PatchSet.Id psId)
public com.google.common.collect.ImmutableCollection<PatchSet> byChange(ChangeNotes notes)
public com.google.common.collect.ImmutableMap<PatchSet.Id,PatchSet> byChangeAsMap(ChangeNotes notes)
public com.google.common.collect.ImmutableMap<PatchSet.Id,PatchSet> getAsMap(ChangeNotes notes, Set<PatchSet.Id> patchSetIds)
public PatchSet insert(org.eclipse.jgit.revwalk.RevWalk rw, ChangeUpdate update, PatchSet.Id psId, org.eclipse.jgit.lib.ObjectId commit, List<String> groups, String pushCertificate, String description) throws IOException
IOException
public void setGroups(ChangeUpdate update, PatchSet ps, List<String> groups)
public void checkPatchSetNotLocked(ChangeNotes notes) throws IOException, ResourceConflictException
IOException
ResourceConflictException
public boolean isPatchSetLocked(ChangeNotes notes) throws IOException
IOException
public org.eclipse.jgit.revwalk.RevCommit getRevCommit(Project.NameKey project, PatchSet patchSet) throws IOException
IOException