Fix MESSAGES and CURRENT_REVISION to only return current revision
In ac60c6e530
a bug was introduced causing all revisions to be
returned if the caller asked for both MESSAGES and CURRENT_REVISION.
Filter the revisions obtained from the database to only the current.
Change-Id: I5098704e482cbe8dceb66b9dcdbba2c8547e27d2
This commit is contained in:
@@ -808,7 +808,9 @@ public class ChangeJson {
|
||||
|
||||
Map<String, RevisionInfo> res = Maps.newLinkedHashMap();
|
||||
for (PatchSet in : map.values()) {
|
||||
if (ctl.isPatchVisible(in, db.get())) {
|
||||
if ((has(ALL_REVISIONS)
|
||||
|| in.getId().equals(cd.change().currentPatchSetId()))
|
||||
&& ctl.isPatchVisible(in, db.get())) {
|
||||
res.put(in.getRevision().get(), toRevisionInfo(cd, in, project));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user