public class ChangeUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static com.google.common.collect.Ordering<PatchSet> |
PS_ID_ORDER |
static int |
TOPIC_MAX_LENGTH |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
messageUuid() |
static PatchSet.Id |
nextPatchSetId(PatchSet.Id id)
Get the next patch set ID just looking at a single previous patch set ID.
|
static PatchSet.Id |
nextPatchSetId(org.eclipse.jgit.lib.Repository git,
PatchSet.Id id)
Get the next patch set ID from scanning refs in the repo.
|
static PatchSet.Id |
nextPatchSetIdFromAllRefsMap(java.util.Map<java.lang.String,org.eclipse.jgit.lib.Ref> allRefs,
PatchSet.Id id)
Get the next patch set ID from a previously-read map of all refs.
|
static PatchSet.Id |
nextPatchSetIdFromChangeRefs(java.util.Collection<java.lang.String> changeRefNames,
PatchSet.Id id)
Get the next patch set ID from a previously-read map of refs below the change prefix.
|
static java.lang.String |
status(Change c) |
public static final int TOPIC_MAX_LENGTH
public static final com.google.common.collect.Ordering<PatchSet> PS_ID_ORDER
public static java.lang.String messageUuid()
public static PatchSet.Id nextPatchSetIdFromAllRefsMap(java.util.Map<java.lang.String,org.eclipse.jgit.lib.Ref> allRefs, PatchSet.Id id)
allRefs
- map of full ref name to ref.id
- previous patch set ID.allRefs
map.public static PatchSet.Id nextPatchSetIdFromChangeRefs(java.util.Collection<java.lang.String> changeRefNames, PatchSet.Id id)
changeRefNames
- existing full change ref names with the same change ID as id
.id
- previous patch set ID.changeRefs
map.public static PatchSet.Id nextPatchSetId(PatchSet.Id id)
This patch set ID may or may not be available in the database; callers that want a
previously-unused ID should use nextPatchSetIdFromAllRefsMap(java.util.Map<java.lang.String, org.eclipse.jgit.lib.Ref>, com.google.gerrit.reviewdb.client.PatchSet.Id)
or nextPatchSetIdFromChangeRefs(java.util.Collection<java.lang.String>, com.google.gerrit.reviewdb.client.PatchSet.Id)
.
id
- previous patch set ID.public static PatchSet.Id nextPatchSetId(org.eclipse.jgit.lib.Repository git, PatchSet.Id id) throws java.io.IOException
git
- repository to scan for patch set refs.id
- previous patch set ID.java.io.IOException
public static java.lang.String status(Change c)