Don't chase non-change commits from /related
The related API call can return non-change commits. Skip these when loading changes into the UI. Change-Id: Ie17ee5d386b84eee81ffdbd46830b4ea2fb28550
This commit is contained in:
@@ -324,7 +324,7 @@ public class RelatedChanges extends TabPanel {
|
||||
: null;
|
||||
}
|
||||
|
||||
final native boolean has_change_number()
|
||||
public final native boolean has_change_number()
|
||||
/*-{ return this.hasOwnProperty('_change_number') }-*/;
|
||||
|
||||
final native boolean has_revision_number()
|
||||
|
@@ -345,7 +345,7 @@ public class ChangeScreen extends Screen
|
||||
List<ChangeInfo> d = new ArrayList<ChangeInfo>();
|
||||
for (CommitInfo p : Natives.asList(self.commit().parents())) {
|
||||
ChangeAndCommit pc = m.get(p.commit());
|
||||
if (pc != null) {
|
||||
if (pc != null && pc.has_change_number()) {
|
||||
ChangeInfo i = new ChangeInfo();
|
||||
load(pc, i);
|
||||
d.add(i);
|
||||
@@ -364,7 +364,9 @@ public class ChangeScreen extends Screen
|
||||
List<ChangeInfo> n = new ArrayList<ChangeInfo>();
|
||||
for (int i = 0; i < info.changes().length(); i++) {
|
||||
ChangeAndCommit c = info.changes().get(i);
|
||||
if (c.commit() != null && c.commit().parents() != null) {
|
||||
if (c.has_change_number()
|
||||
&& c.commit() != null
|
||||
&& c.commit().parents() != null) {
|
||||
for (int j = 0; j < c.commit().parents().length(); j++) {
|
||||
CommitInfo p = c.commit().parents().get(j);
|
||||
if (mine.contains(p.commit())) {
|
||||
|
Reference in New Issue
Block a user