Modify PatchLineComment parser to incorporate status
In anticipation of the ability to write draft PatchLineComments to NoteMaps, I modified some of the parsing code for reading comments out of NoteMaps to take status as a parameter so that when it parses a List of PatchLineComments out of the notes, they have the correct status. This is valid to do because all comments in the same note will all have the same status. Additionally, I had to modify the ChangeNotesTest class in combination with this to make sure that the comments being created for testing purposes had the status flag set correctly. Change-Id: If32e7075427abd2e6f02721824e8099243806243
This commit is contained in:
@@ -44,6 +44,7 @@ import com.google.gerrit.reviewdb.client.Change;
|
||||
import com.google.gerrit.reviewdb.client.ChangeMessage;
|
||||
import com.google.gerrit.reviewdb.client.PatchLineComment;
|
||||
import com.google.gerrit.reviewdb.client.PatchSet;
|
||||
import com.google.gerrit.reviewdb.client.PatchLineComment.Status;
|
||||
import com.google.gerrit.reviewdb.client.PatchSet.Id;
|
||||
import com.google.gerrit.reviewdb.client.PatchSetApproval;
|
||||
import com.google.gerrit.reviewdb.client.PatchSetApproval.LabelId;
|
||||
@@ -323,7 +324,7 @@ public class ChangeNotes extends AbstractChangeNotes<ChangeNotes> {
|
||||
throws IOException, ConfigInvalidException, ParseException {
|
||||
commentNoteMap = CommentsInNotesUtil.parseCommentsFromNotes(repo,
|
||||
ChangeNoteUtil.changeRefName(changeId), walk, changeId,
|
||||
commentsForBase, commentsForPs);
|
||||
commentsForBase, commentsForPs, Status.PUBLISHED);
|
||||
}
|
||||
|
||||
private void parseApproval(PatchSet.Id psId, Account.Id accountId,
|
||||
|
Reference in New Issue
Block a user