MergeSuperSet: Request mergeable field
This was not needed by MergeSuperSet specifically, but is required in order to convert to ChangeInfo at the call site in SubmittedTogether. Clarify the nearby comment. Change-Id: I0b6d3ce52e5cd5d3b0f4e48a089fc28f720326bf
This commit is contained in:
@@ -78,6 +78,7 @@ public class MergeSuperSet {
|
||||
for (ChangeData cd : cs.changes()) {
|
||||
cd.reloadChange();
|
||||
cd.setPatchSets(null);
|
||||
cd.setMergeable(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -316,13 +317,15 @@ public class MergeSuperSet {
|
||||
}
|
||||
|
||||
private InternalChangeQuery query() {
|
||||
// Request fields required for completing the ChangeSet without having to
|
||||
// touch the database. This provides reasonable performance when loading the
|
||||
// change screen; callers that care about reading the latest value of these
|
||||
// fields should clear them explicitly using reloadChanges().
|
||||
// Request fields required for completing the ChangeSet and converting to
|
||||
// ChangeInfo without having to touch the database or opening the repository
|
||||
// more than necessary. This provides reasonable performance when loading
|
||||
// the change screen; callers that care about reading the latest value of
|
||||
// these fields should clear them explicitly using reloadChanges().
|
||||
Set<String> fields = ImmutableSet.of(
|
||||
ChangeField.CHANGE.getName(),
|
||||
ChangeField.PATCH_SET.getName());
|
||||
ChangeField.PATCH_SET.getName(),
|
||||
ChangeField.MERGEABLE.getName());
|
||||
return queryProvider.get().setRequestedFields(fields);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user