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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user