Merge "Remove requireChangeId."
diff --git a/java/com/google/gerrit/server/ApprovalCopier.java b/java/com/google/gerrit/server/ApprovalCopier.java
index 979cc11..85a6079 100644
--- a/java/com/google/gerrit/server/ApprovalCopier.java
+++ b/java/com/google/gerrit/server/ApprovalCopier.java
@@ -73,49 +73,27 @@
Iterable<PatchSetApproval> getForPatchSet(
ChangeNotes notes, PatchSet.Id psId, @Nullable RevWalk rw, @Nullable Config repoConfig) {
- return getForPatchSet(notes, psId, rw, repoConfig, Collections.emptyList());
- }
- Iterable<PatchSetApproval> getForPatchSet(
- ChangeNotes notes,
- PatchSet.Id psId,
- @Nullable RevWalk rw,
- @Nullable Config repoConfig,
- Iterable<PatchSetApproval> dontCopy) {
PatchSet ps = psUtil.get(notes, psId);
if (ps == null) {
return Collections.emptyList();
}
- return getForPatchSet(notes, ps, rw, repoConfig, dontCopy);
- }
- private Iterable<PatchSetApproval> getForPatchSet(
- ChangeNotes notes,
- PatchSet ps,
- @Nullable RevWalk rw,
- @Nullable Config repoConfig,
- Iterable<PatchSetApproval> dontCopy) {
- requireNonNull(ps, "ps should not be null");
ChangeData cd = changeDataFactory.create(notes);
try {
ProjectState project = projectCache.checkedGet(cd.change().getDest().project());
ListMultimap<PatchSet.Id, PatchSetApproval> all = cd.approvals();
requireNonNull(all, "all should not be null");
- Table<String, Account.Id, PatchSetApproval> wontCopy = HashBasedTable.create();
- for (PatchSetApproval psa : dontCopy) {
- wontCopy.put(psa.label(), psa.accountId(), psa);
- }
-
Table<String, Account.Id, PatchSetApproval> byUser = HashBasedTable.create();
for (PatchSetApproval psa : all.get(ps.id())) {
- if (!wontCopy.contains(psa.label(), psa.accountId())) {
- byUser.put(psa.label(), psa.accountId(), psa);
- }
+ byUser.put(psa.label(), psa.accountId(), psa);
}
TreeMap<Integer, PatchSet> patchSets = getPatchSets(cd);
+ Table<String, Account.Id, PatchSetApproval> wontCopy = HashBasedTable.create();
+
// Walk patch sets strictly less than current in descending order.
Collection<PatchSet> allPrior =
patchSets.descendingMap().tailMap(ps.id().get(), false).values();
diff --git a/polygerrit-ui/app/elements/core/gr-reporting/gr-reporting.js b/polygerrit-ui/app/elements/core/gr-reporting/gr-reporting.js
index 83f68a1..f247156 100644
--- a/polygerrit-ui/app/elements/core/gr-reporting/gr-reporting.js
+++ b/polygerrit-ui/app/elements/core/gr-reporting/gr-reporting.js
@@ -201,8 +201,11 @@
if (type === ERROR.TYPE && category === ERROR.CATEGORY) {
console.error(eventValue.error || eventName);
} else {
- console.log(eventName + (eventValue !== undefined ?
- (': ' + eventValue) : ''));
+ if (eventValue !== undefined) {
+ console.log(`Reporting: ${eventName}: ${eventValue}`);
+ } else {
+ console.log(`Reporting: ${eventName}`);
+ }
}
},
diff --git a/polygerrit-ui/app/elements/gr-app-element.js b/polygerrit-ui/app/elements/gr-app-element.js
index af69af8..4d556ae 100644
--- a/polygerrit-ui/app/elements/gr-app-element.js
+++ b/polygerrit-ui/app/elements/gr-app-element.js
@@ -424,8 +424,6 @@
if (window.VERSION_INFO) {
console.log(`UI Version Info: ${window.VERSION_INFO}`);
}
- const renderTime = new Date(window.performance.timing.loadEventStart);
- console.log(`Document loaded at: ${renderTime}`);
console.log(`Please file bugs and feedback at: ${this._feedbackUrl}`);
console.groupEnd();
},