ChangeRebuilder: Sort PatchLineCommentEvents

Change-Id: I505ce0977d718626ad94228dc4a2c96c6cd94bee
This commit is contained in:
Dave Borowitz
2016-03-10 14:13:33 -05:00
parent 1693e1b8ef
commit a9a99130cf

View File

@@ -168,7 +168,10 @@ public class ChangeRebuilder {
RevWalk codeRw = new RevWalk(codeRepo)) {
for (PatchSet ps : db.patchSets().byChange(changeId)) {
events.add(new PatchSetEvent(change, ps, codeRw));
for (PatchLineComment c : db.patchComments().byPatchSet(ps.getId())) {
List<PatchLineComment> comments =
PatchLineCommentsUtil.PLC_ORDER.sortedCopy(
db.patchComments().byPatchSet(ps.getId()));
for (PatchLineComment c : comments) {
PatchLineCommentEvent e =
new PatchLineCommentEvent(c, change, ps, patchListCache);
if (c.getStatus() == Status.PUBLISHED) {