PatchListCache: Add method for getting old ID of a patch set

For a batch NoteDb rebuilding job with its own PatchListCache
implementation, this method is much easier to implement than the more
generic get methods. Plus, it simplifies the code in setCommentRevId.

Change-Id: Iee126283e04328f2a497d99efe0f4f9cdc961590
This commit is contained in:
Dave Borowitz
2016-04-01 15:29:07 -04:00
parent d704863a37
commit 2605931de4
3 changed files with 14 additions and 9 deletions

View File

@@ -18,6 +18,8 @@ import com.google.gerrit.reviewdb.client.Change;
import com.google.gerrit.reviewdb.client.PatchSet;
import com.google.gerrit.reviewdb.client.Project;
import org.eclipse.jgit.lib.ObjectId;
/** Provides a cached list of {@link PatchListEntry}. */
public interface PatchListCache {
PatchList get(PatchListKey key, Project.NameKey project)
@@ -26,6 +28,9 @@ public interface PatchListCache {
PatchList get(Change change, PatchSet patchSet)
throws PatchListNotAvailableException;
ObjectId getOldId(Change change, PatchSet patchSet)
throws PatchListNotAvailableException;
IntraLineDiff getIntraLineDiff(IntraLineDiffKey key,
IntraLineDiffArgs args);
}