public class PatchList extends Object implements Serializable
Constructor and Description |
---|
PatchList(org.eclipse.jgit.lib.AnyObjectId oldId,
org.eclipse.jgit.lib.AnyObjectId newId,
boolean againstParent,
PatchListEntry[] patches) |
Modifier and Type | Method and Description |
---|---|
PatchListEntry |
get(String fileName)
Find an entry by name, returning an empty entry if not present.
|
int |
getDeletions() |
int |
getInsertions() |
org.eclipse.jgit.lib.ObjectId |
getNewId()
New side commit.
|
org.eclipse.jgit.lib.ObjectId |
getOldId()
Old side tree or commit; null only if this is a combined diff.
|
List<PatchListEntry> |
getPatches()
Get a sorted, unmodifiable list of all files in this list.
|
boolean |
isAgainstParent() |
List<com.google.gerrit.reviewdb.client.Patch> |
toPatchList(com.google.gerrit.reviewdb.client.PatchSet.Id setId)
Get a sorted, modifiable list of all files in this list.
|
public PatchList(org.eclipse.jgit.lib.AnyObjectId oldId, org.eclipse.jgit.lib.AnyObjectId newId, boolean againstParent, PatchListEntry[] patches)
public org.eclipse.jgit.lib.ObjectId getOldId()
public org.eclipse.jgit.lib.ObjectId getNewId()
public List<PatchListEntry> getPatches()
public boolean isAgainstParent()
getOldId()
is getNewId()
's ancestor.public int getInsertions()
public int getDeletions()
public List<com.google.gerrit.reviewdb.client.Patch> toPatchList(com.google.gerrit.reviewdb.client.PatchSet.Id setId)
The returned list items do not populate:
Patch.getCommentCount()
Patch.getDraftCount()
Patch.isReviewedByCurrentUser()
setId
- the patch set identity these patches belong to. This really
should not need to be specified, but is a current legacy artifact of
how the cache is keyed versus how the database is keyed.public PatchListEntry get(String fileName)