GetRelated: Discard single commit by its hash instead of change/ps

change/ps is only available for open changes.

Change-Id: I04e96635b01a231918f2adf83fd759376b9be80a
This commit is contained in:
Orgad Shaneh
2014-09-18 14:31:14 +03:00
parent 93fa2aae04
commit 20984b0500

View File

@@ -127,9 +127,7 @@ public class GetRelated implements RestReadView<RevisionResource> {
if (list.size() == 1) {
ChangeAndCommit r = list.get(0);
if (r._changeNumber != null && r._revisionNumber != null
&& r._changeNumber == rsrc.getChange().getChangeId()
&& r._revisionNumber == rsrc.getPatchSet().getPatchSetId()) {
if (r.commit != null && r.commit.commit.equals(rsrc.getPatchSet().getRevision().get())) {
return Collections.emptyList();
}
}