summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJukka Jokiniva <jukka.jokiniva@qt.io>2022-10-07 10:03:53 +0300
committerJukka Jokiniva <jukka.jokiniva@qt.io>2022-10-12 15:32:03 +0300
commit7e802e45b9aae3849860ef8356f40f4d78355926 (patch)
tree3fec771bae800a3b5742b3179ee30d5a2acd1664
parentddff26bca2841e1920d90f8e05f39614b3dc1209 (diff)
parent86bdbbc48133b6ab07a44bef47a4785d504d7f09 (diff)
Merge remote-tracking branch 'origin/v3.5.2-based' into v3.5.3-basedv3.5.3-based
* origin/v3.5.2-based: Fix issue of some changes not loading Clear attention set when change is deferred Add label score extension points for plugin customization Add integrating section to change dashboard Fix submodule urls Modify Gerrit version string to indicate that this is a Qt fork Add QtStage permission Update status values staged, integrating and deferred for client side modules Update status values staged, integrating and deferred for java modules Change-Id: I7a780ad7b08f97982d86d5a34d472c5b7bc3e3c5 Task-number: QTQAINFRA-5213
-rw-r--r--.gitmodules27
-rw-r--r--java/com/google/gerrit/common/PageLinks.java9
-rw-r--r--java/com/google/gerrit/entities/Change.java28
-rw-r--r--java/com/google/gerrit/entities/Permission.java2
-rw-r--r--java/com/google/gerrit/extensions/client/ChangeStatus.java34
-rw-r--r--java/com/google/gerrit/server/notedb/ChangeUpdate.java3
-rw-r--r--java/com/google/gerrit/server/permissions/ChangeControl.java2
-rw-r--r--java/com/google/gerrit/server/permissions/ChangePermission.java3
-rw-r--r--java/com/google/gerrit/server/permissions/DefaultPermissionMappings.java1
-rw-r--r--java/com/google/gerrit/server/query/change/InternalChangeQuery.java4
-rw-r--r--polygerrit-ui/app/api/rest-api.ts3
-rw-r--r--polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.ts2
-rw-r--r--polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.ts13
-rw-r--r--polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row.ts4
-rw-r--r--polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_html.ts2
-rw-r--r--polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores.ts18
-rw-r--r--polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-change.ts9
-rw-r--r--polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.ts12
-rw-r--r--polygerrit-ui/app/elements/core/gr-navigation/gr-navigation.ts11
-rw-r--r--polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.ts6
-rw-r--r--polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status.ts3
-rw-r--r--polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_html.ts12
-rw-r--r--polygerrit-ui/app/styles/themes/app-theme.ts3
-rw-r--r--polygerrit-ui/app/styles/themes/dark-theme.ts3
-rw-r--r--polygerrit-ui/app/utils/access-util.ts5
-rw-r--r--polygerrit-ui/app/utils/change-util.ts9
-rw-r--r--polygerrit-ui/app/utils/message-util.ts11
-rw-r--r--tools/workspace_status.py2
28 files changed, 216 insertions, 25 deletions
diff --git a/.gitmodules b/.gitmodules
index e5eef1e538..7a4bd50ea0 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,63 +1,64 @@
[submodule "modules/jgit"]
path = modules/jgit
- url = ../jgit
+ url = https://gerrit.googlesource.com/jgit
+ branch = .
[submodule "plugins/codemirror-editor"]
path = plugins/codemirror-editor
- url = ../plugins/codemirror-editor
+ url = https://gerrit.googlesource.com/plugins/codemirror-editor
branch = .
[submodule "plugins/commit-message-length-validator"]
path = plugins/commit-message-length-validator
- url = ../plugins/commit-message-length-validator
+ url = https://gerrit.googlesource.com/plugins/commit-message-length-validator
branch = .
[submodule "plugins/delete-project"]
path = plugins/delete-project
- url = ../plugins/delete-project
+ url = https://gerrit.googlesource.com/plugins/delete-project
branch = .
[submodule "plugins/download-commands"]
path = plugins/download-commands
- url = ../plugins/download-commands
+ url = https://gerrit.googlesource.com/plugins/download-commands
branch = .
[submodule "plugins/gitiles"]
path = plugins/gitiles
- url = ../plugins/gitiles
+ url = https://gerrit.googlesource.com/plugins/gitiles
branch = .
[submodule "plugins/hooks"]
path = plugins/hooks
- url = ../plugins/hooks
+ url = https://gerrit.googlesource.com/plugins/hooks
branch = .
[submodule "plugins/plugin-manager"]
path = plugins/plugin-manager
- url = ../plugins/plugin-manager
+ url = https://gerrit.googlesource.com/plugins/plugin-manager
branch = .
[submodule "plugins/replication"]
path = plugins/replication
- url = ../plugins/replication
+ url = https://gerrit.googlesource.com/plugins/replication
branch = .
[submodule "plugins/reviewnotes"]
path = plugins/reviewnotes
- url = ../plugins/reviewnotes
+ url = https://gerrit.googlesource.com/plugins/reviewnotes
branch = .
[submodule "plugins/singleusergroup"]
path = plugins/singleusergroup
- url = ../plugins/singleusergroup
+ url = https://gerrit.googlesource.com/plugins/singleusergroup
branch = .
[submodule "plugins/webhooks"]
path = plugins/webhooks
- url = ../plugins/webhooks
+ url = https://gerrit.googlesource.com/plugins/webhooks
branch = .
[submodule "polymer-bridges"]
path = polymer-bridges
- url = ../polymer-bridges
+ url = https://gerrit.googlesource.com/polymer-bridges
branch = .
diff --git a/java/com/google/gerrit/common/PageLinks.java b/java/com/google/gerrit/common/PageLinks.java
index 38de5b15a1..98dd697374 100644
--- a/java/com/google/gerrit/common/PageLinks.java
+++ b/java/com/google/gerrit/common/PageLinks.java
@@ -141,6 +141,9 @@ public class PageLinks {
public static String topicQuery(Status status, String topic) {
switch (status) {
case ABANDONED:
+ case DEFERRED:
+ case INTEGRATING:
+ case STAGED:
return toChangeQuery(status(status) + " " + op("topic", topic));
case MERGED:
case NEW:
@@ -168,6 +171,12 @@ public class PageLinks {
return "status:abandoned";
case MERGED:
return "status:merged";
+ case INTEGRATING:
+ return "status:integrating";
+ case DEFERRED:
+ return "status:deferred";
+ case STAGED:
+ return "status:staged";
case NEW:
default:
return "status:open";
diff --git a/java/com/google/gerrit/entities/Change.java b/java/com/google/gerrit/entities/Change.java
index d1826bc6df..9157b5906a 100644
--- a/java/com/google/gerrit/entities/Change.java
+++ b/java/com/google/gerrit/entities/Change.java
@@ -322,9 +322,16 @@ public final class Change {
private static final char MIN_OPEN = 'a';
/** Database constant for {@link Status#NEW}. */
public static final char STATUS_NEW = 'n';
+
/** Maximum database status constant for an open change. */
private static final char MAX_OPEN = 'z';
+ /** Database constant for {@link Status#STAGED}. */
+ public static final char STATUS_STAGED = 'R';
+
+ /** Database constant for {@link Status#INTEGRATING}. */
+ public static final char STATUS_INTEGRATING = 'I';
+
/** Database constant for {@link Status#MERGED}. */
public static final char STATUS_MERGED = 'M';
@@ -358,6 +365,9 @@ public final class Change {
*/
NEW(STATUS_NEW, ChangeStatus.NEW),
+ STAGED(STATUS_STAGED, ChangeStatus.STAGED),
+ INTEGRATING(STATUS_INTEGRATING, ChangeStatus.INTEGRATING),
+
/**
* Change is closed, and submitted to its destination branch.
*
@@ -372,7 +382,9 @@ public final class Change {
* patch set, and it cannot be merged. Draft comments however may be published, permitting
* reviewers to send constructive feedback.
*/
- ABANDONED('A', ChangeStatus.ABANDONED);
+ ABANDONED('A', ChangeStatus.ABANDONED),
+
+ DEFERRED('D', ChangeStatus.DEFERRED);
static {
boolean ok = true;
@@ -683,8 +695,20 @@ public final class Change {
return getStatus().equals(Status.ABANDONED);
}
+ public boolean isIntegrating() {
+ return getStatus().equals(Status.INTEGRATING);
+ }
+
+ public boolean isStaged() {
+ return getStatus().equals(Status.STAGED);
+ }
+
+ public boolean isDeferred() {
+ return getStatus().equals(Status.DEFERRED);
+ }
+
public boolean isClosed() {
- return isAbandoned() || isMerged();
+ return isAbandoned() || isMerged() || isStaged() || isIntegrating() || isDeferred();
}
public String getTopic() {
diff --git a/java/com/google/gerrit/entities/Permission.java b/java/com/google/gerrit/entities/Permission.java
index 95164bdee5..ab583422b0 100644
--- a/java/com/google/gerrit/entities/Permission.java
+++ b/java/com/google/gerrit/entities/Permission.java
@@ -54,6 +54,7 @@ public abstract class Permission implements Comparable<Permission> {
public static final String SUBMIT_AS = "submitAs";
public static final String TOGGLE_WORK_IN_PROGRESS_STATE = "toggleWipState";
public static final String VIEW_PRIVATE_CHANGES = "viewPrivateChanges";
+ public static final String QT_STAGE = "stage";
public static final boolean DEF_EXCLUSIVE_GROUP = false;
@@ -90,6 +91,7 @@ public abstract class Permission implements Comparable<Permission> {
NAMES_LC.add(SUBMIT_AS.toLowerCase());
NAMES_LC.add(TOGGLE_WORK_IN_PROGRESS_STATE.toLowerCase());
NAMES_LC.add(VIEW_PRIVATE_CHANGES.toLowerCase());
+ NAMES_LC.add(QT_STAGE.toLowerCase());
LABEL_INDEX = NAMES_LC.indexOf(Permission.LABEL);
LABEL_AS_INDEX = NAMES_LC.indexOf(Permission.LABEL_AS.toLowerCase());
diff --git a/java/com/google/gerrit/extensions/client/ChangeStatus.java b/java/com/google/gerrit/extensions/client/ChangeStatus.java
index 83d5bd2cc7..89cdf5d468 100644
--- a/java/com/google/gerrit/extensions/client/ChangeStatus.java
+++ b/java/com/google/gerrit/extensions/client/ChangeStatus.java
@@ -34,6 +34,22 @@ public enum ChangeStatus {
NEW,
/**
+ * Change is staged and waiting for CI to start a build of it.
+ *
+ * <p> While a change is staged, it cannot be further modified by adding a replacement patch
+ * set.
+ */
+ STAGED,
+
+ /**
+ * Change is integrating in a build on a CI system.
+ *
+ * <p> While a change is integrating, it cannot be further modified by adding a replacement patch
+ * set.
+ */
+ INTEGRATING,
+
+ /**
* Change is closed, and submitted to its destination branch.
*
* <p>Once a change has been merged, it cannot be further modified by adding a replacement patch
@@ -54,5 +70,21 @@ public enum ChangeStatus {
* <li>{@link #NEW} - when the Restore action is used.
* </ul>
*/
- ABANDONED
+ ABANDONED,
+
+ /**
+ * Change is closed, but was not submitted to its destination branch. Deferred is similar
+ * to abandoned, the difference is that the change is expected to be reopened later.
+ *
+ * <p>Once a change has been deferred, it cannot be further modified by adding a replacement
+ * patch set, and it cannot be merged. Draft comments however may be published, permitting
+ * reviewers to send constructive feedback.
+ *
+ * <p>Changes in the DEFERRED state can be moved to:
+ *
+ * <ul>
+ * <li>{@link #NEW} - when the Reopen action is used.
+ * </ul>
+ */
+ DEFERRED
}
diff --git a/java/com/google/gerrit/server/notedb/ChangeUpdate.java b/java/com/google/gerrit/server/notedb/ChangeUpdate.java
index cc9b1934c4..8a9fba1c74 100644
--- a/java/com/google/gerrit/server/notedb/ChangeUpdate.java
+++ b/java/com/google/gerrit/server/notedb/ChangeUpdate.java
@@ -675,6 +675,9 @@ public class ChangeUpdate extends AbstractChangeUpdate {
if (status.equals(Change.Status.ABANDONED)) {
clearAttentionSet("Change was abandoned");
}
+ if (status.equals(Change.Status.DEFERRED)) {
+ clearAttentionSet("Change was deferred");
+ }
if (status.equals(Change.Status.MERGED)) {
clearAttentionSet("Change was submitted");
}
diff --git a/java/com/google/gerrit/server/permissions/ChangeControl.java b/java/com/google/gerrit/server/permissions/ChangeControl.java
index 37c773ac31..0987b8d9a2 100644
--- a/java/com/google/gerrit/server/permissions/ChangeControl.java
+++ b/java/com/google/gerrit/server/permissions/ChangeControl.java
@@ -282,6 +282,8 @@ class ChangeControl {
case REMOVE_REVIEWER:
case SUBMIT_AS:
return refControl.canPerform(changePermissionName(perm));
+ case QT_STAGE:
+ return refControl.canPerform(Permission.QT_STAGE);
}
} catch (StorageException e) {
throw new PermissionBackendException("unavailable", e);
diff --git a/java/com/google/gerrit/server/permissions/ChangePermission.java b/java/com/google/gerrit/server/permissions/ChangePermission.java
index 63b03787b2..0241e38679 100644
--- a/java/com/google/gerrit/server/permissions/ChangePermission.java
+++ b/java/com/google/gerrit/server/permissions/ChangePermission.java
@@ -57,7 +57,8 @@ public enum ChangePermission implements ChangePermissionOrLabel {
REVERT,
SUBMIT,
SUBMIT_AS("submit on behalf of other users"),
- TOGGLE_WORK_IN_PROGRESS_STATE;
+ TOGGLE_WORK_IN_PROGRESS_STATE,
+ QT_STAGE("stage change for CI");
private final String description;
diff --git a/java/com/google/gerrit/server/permissions/DefaultPermissionMappings.java b/java/com/google/gerrit/server/permissions/DefaultPermissionMappings.java
index 9d69d9bad6..3ab68d73fd 100644
--- a/java/com/google/gerrit/server/permissions/DefaultPermissionMappings.java
+++ b/java/com/google/gerrit/server/permissions/DefaultPermissionMappings.java
@@ -102,6 +102,7 @@ public class DefaultPermissionMappings {
.put(
ChangePermission.TOGGLE_WORK_IN_PROGRESS_STATE,
Permission.TOGGLE_WORK_IN_PROGRESS_STATE)
+ .put(ChangePermission.QT_STAGE, Permission.QT_STAGE)
.build();
private static <T extends Enum<T>> void checkMapContainsAllEnumValues(
diff --git a/java/com/google/gerrit/server/query/change/InternalChangeQuery.java b/java/com/google/gerrit/server/query/change/InternalChangeQuery.java
index c8e9f662a1..4d47884a90 100644
--- a/java/com/google/gerrit/server/query/change/InternalChangeQuery.java
+++ b/java/com/google/gerrit/server/query/change/InternalChangeQuery.java
@@ -152,6 +152,10 @@ public class InternalChangeQuery extends InternalQuery<ChangeData, InternalChang
return query(and(ref(branch), project(branch.project()), status(Change.Status.NEW)));
}
+ public List<ChangeData> byBranchStatus(BranchNameKey branch, Change.Status status) {
+ return query(and(ref(branch), project(branch.project()), status(status)));
+ }
+
public Iterable<ChangeData> byCommitsOnBranchNotMerged(
Repository repo, BranchNameKey branch, Collection<String> hashes) throws IOException {
return byCommitsOnBranchNotMerged(
diff --git a/polygerrit-ui/app/api/rest-api.ts b/polygerrit-ui/app/api/rest-api.ts
index 3d1008c7d3..34a5afe06d 100644
--- a/polygerrit-ui/app/api/rest-api.ts
+++ b/polygerrit-ui/app/api/rest-api.ts
@@ -54,6 +54,9 @@ export enum ChangeStatus {
ABANDONED = 'ABANDONED',
MERGED = 'MERGED',
NEW = 'NEW',
+ DEFERRED = 'DEFERRED',
+ INTEGRATING = 'INTEGRATING',
+ STAGED = 'STAGED',
}
/**
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.ts b/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.ts
index a79dd8ea0d..e8f1aa5f28 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.ts
@@ -52,7 +52,7 @@ import {ScrollMode} from '../../../constants/constants';
import {listen} from '../../../services/shortcuts/shortcuts-service';
const NUMBER_FIXED_COLUMNS = 3;
-const CLOSED_STATUS = ['MERGED', 'ABANDONED'];
+const CLOSED_STATUS = ['MERGED', 'ABANDONED', 'DEFERRED', 'INTEGRATING', 'STAGED'];
const LABEL_PREFIX_INVALID_PROLOG = 'Invalid-Prolog-Rules-Label-Name--';
const MAX_SHORTCUT_CHARS = 5;
diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.ts b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.ts
index b635d3f6da..911f7c4640 100644
--- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.ts
@@ -216,6 +216,9 @@ const ReloadToastMessage = {
ABANDONED: 'This change has been abandoned',
MERGED: 'This change has been merged',
NEW_MESSAGE: 'There are new messages on this change',
+ STAGED: 'This change has been staged',
+ INTEGRATING: 'This change is now integrating',
+ DEFERRED: 'This change has been deferred',
};
// Making the tab names more unique in case a plugin adds one with same name
@@ -1806,6 +1809,7 @@ export class GrChangeView extends base {
// if a change is deleted then getChanges returns null for that changeId
changes = changes.filter(
change => change && change.status !== ChangeStatus.ABANDONED
+ && change.status !== ChangeStatus.DEFERRED
);
if (!changes.length) return;
const submittedRevert = changes.find(
@@ -2202,6 +2206,9 @@ export class GrChangeView extends base {
// answer for abandoned changes.
if (
this._change.status === ChangeStatus.MERGED ||
+ this._change.status === ChangeStatus.STAGED ||
+ this._change.status === ChangeStatus.INTEGRATING ||
+ this._change.status === ChangeStatus.DEFERRED ||
this._change.status === ChangeStatus.ABANDONED
) {
this._mergeable = false;
@@ -2304,6 +2311,12 @@ export class GrChangeView extends base {
toastMessage = ReloadToastMessage.ABANDONED;
} else if (result.newStatus === ChangeStatus.NEW) {
toastMessage = ReloadToastMessage.RESTORED;
+ } else if (result.newStatus === ChangeStatus.STAGED) {
+ toastMessage = ReloadToastMessage.STAGED;
+ } else if (result.newStatus === ChangeStatus.INTEGRATING) {
+ toastMessage = ReloadToastMessage.INTEGRATING;
+ } else if (result.newStatus === ChangeStatus.DEFERRED) {
+ toastMessage = ReloadToastMessage.DEFERRED;
} else if (result.newMessages) {
toastMessage = ReloadToastMessage.NEW_MESSAGE;
if (result.newMessages.author?.name) {
diff --git a/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row.ts b/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row.ts
index 9a38095cac..dea06ee683 100644
--- a/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row.ts
+++ b/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row.ts
@@ -282,4 +282,8 @@ export class GrLabelScoreRow extends PolymerElement {
(labels[label] as DetailedLabelInfo).values![value]
);
}
+
+ _computeDecoratorName(preString: string, name: string) {
+ return preString + name.toLowerCase();
+ }
}
diff --git a/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_html.ts b/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_html.ts
index e57a2163f1..fbfb478cb2 100644
--- a/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_html.ts
+++ b/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_html.ts
@@ -99,6 +99,7 @@ export const htmlTemplate = html`
}
}
</style>
+ <gr-endpoint-decorator name$="[[_computeDecoratorName('review-label-scores-', label.name)]]">
<span class="labelNameCell" id="labelName" aria-hidden="true"
>[[label.name]]</span
>
@@ -157,4 +158,5 @@ export const htmlTemplate = html`
>
<span id="selectedValueLabel">[[_selectedValueText]]</span>
</div>
+ </gr-endpoint-decorator>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores.ts b/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores.ts
index a496be5bae..181ea16cb6 100644
--- a/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores.ts
+++ b/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores.ts
@@ -102,6 +102,24 @@ export class GrLabelScores extends LitElement {
?hidden=${this.change?.status !== ChangeStatus.ABANDONED}
>
Because this change has been abandoned, you cannot vote.
+ </div>
+ <div
+ class="abandonedMessage"
+ ?hidden=${this.change?.status !== ChangeStatus.DEFERRED}
+ >
+ Because this change has been deferred, you cannot vote.
+ </div>
+ <div
+ class="mergedMessage"
+ ?hidden=${this.change?.status !== ChangeStatus.STAGED}
+ >
+ Because this change is integrating, votes may not be decreased.
+ </div>
+ <div
+ class="mergedMessage"
+ ?hidden=${this.change?.status !== ChangeStatus.INTEGRATING}
+ >
+ Because this change is integrating, votes may not be decreased.
</div>`;
}
diff --git a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-change.ts b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-change.ts
index e4703df2e6..99e9cb46d0 100644
--- a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-change.ts
+++ b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-change.ts
@@ -132,7 +132,8 @@ export class GrRelatedChange extends LitElement {
_computeLinkClass(change: ChangeInfo | RelatedChangeAndCommitInfo) {
const statuses = [];
- if (change.status === ChangeStatus.ABANDONED) {
+ if (change.status === ChangeStatus.ABANDONED ||
+ change.status === ChangeStatus.DEFERRED) {
statuses.push('strikethrough');
}
if (change.submittable) {
@@ -161,6 +162,12 @@ export class GrRelatedChange extends LitElement {
return 'Merged';
case ChangeStatus.ABANDONED:
return 'Abandoned';
+ case ChangeStatus.DEFERRED:
+ return 'Deferred';
+ case ChangeStatus.INTEGRATING:
+ return 'Integrating';
+ case ChangeStatus.STAGED:
+ return 'Staged';
}
if (change._revision_number !== change._current_revision_number) {
return 'Not current';
diff --git a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.ts b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.ts
index 9d34929723..ea2b92579d 100644
--- a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.ts
+++ b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.ts
@@ -58,10 +58,22 @@ const DEFAULT_LINKS: MainHeaderLinkGroup[] = [
name: 'Open',
},
{
+ url: '/q/status:staged',
+ name: 'Staged',
+ },
+ {
+ url: '/q/status:integrating',
+ name: 'Integrating',
+ },
+ {
url: '/q/status:merged',
name: 'Merged',
},
{
+ url: '/q/status:deferred',
+ name: 'Deferred',
+ },
+ {
url: '/q/status:abandoned',
name: 'Abandoned',
},
diff --git a/polygerrit-ui/app/elements/core/gr-navigation/gr-navigation.ts b/polygerrit-ui/app/elements/core/gr-navigation/gr-navigation.ts
index b8f2630c35..be030a8483 100644
--- a/polygerrit-ui/app/elements/core/gr-navigation/gr-navigation.ts
+++ b/polygerrit-ui/app/elements/core/gr-navigation/gr-navigation.ts
@@ -209,6 +209,14 @@ const CCED: DashboardSection = {
query: 'is:open -is:ignored -is:wip cc:${user}',
suffixForDashboard: 'limit:10',
};
+export const INTEGRATING: DashboardSection = {
+ name: 'Integrating',
+ query:
+ '(is:staged OR is:integrating) -is:ignored (-is:wip OR owner:self) ' +
+ '(owner:${user} OR reviewer:${user} OR assignee:${user} ' +
+ 'OR cc:${user})',
+ suffixForDashboard: 'limit:20',
+};
export const CLOSED: DashboardSection = {
name: 'Recently closed',
// Closed changes where viewed user is owner, reviewer, or assignee.
@@ -216,7 +224,7 @@ export const CLOSED: DashboardSection = {
// changes not owned by the viewing user (the one instance of
// 'owner:self' is intentional and implements this logic).
query:
- 'is:closed -is:ignored (-is:wip OR owner:self) ' +
+ '(is:merged OR is:abandoned OR is:deferred) -is:ignored (-is:wip OR owner:self) ' +
'(owner:${user} OR reviewer:${user} OR assignee:${user} ' +
'OR cc:${user})',
suffixForDashboard: '-age:4w limit:10',
@@ -229,6 +237,7 @@ const DEFAULT_SECTIONS: DashboardSection[] = [
OUTGOING,
INCOMING,
CCED,
+ INTEGRATING,
CLOSED,
];
diff --git a/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.ts b/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.ts
index 2901b8a43b..add8d9bbdd 100644
--- a/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.ts
+++ b/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.ts
@@ -80,7 +80,9 @@ const SEARCH_OPERATORS: ReadonlyArray<string> = [
'is:attention',
'is:cherrypick',
'is:closed',
+ 'is:deferred',
'is:ignored',
+ 'is:integrating',
'is:merge',
'is:merged',
'is:open',
@@ -88,6 +90,7 @@ const SEARCH_OPERATORS: ReadonlyArray<string> = [
'is:private',
'is:reviewed',
'is:reviewer',
+ 'is:staged',
'is:starred',
'is:submittable',
'is:watched',
@@ -117,9 +120,12 @@ const SEARCH_OPERATORS: ReadonlyArray<string> = [
'status:',
'status:abandoned',
'status:closed',
+ 'status:deferred',
+ 'status:integrating',
'status:merged',
'status:open',
'status:reviewed',
+ 'status:staged',
'submissionid:',
'topic:',
'tr:',
diff --git a/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status.ts b/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status.ts
index 0bd02d55f9..eb467d5cca 100644
--- a/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status.ts
+++ b/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status.ts
@@ -37,6 +37,9 @@ export enum ChangeStates {
REVERT_CREATED = 'Revert Created',
REVERT_SUBMITTED = 'Revert Submitted',
WIP = 'WIP',
+ DEFERRED = 'Deferred',
+ INTEGRATING = 'Integrating',
+ STAGED = 'Staged',
}
const WIP_TOOLTIP =
diff --git a/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_html.ts b/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_html.ts
index 455bd4e0a9..168647ba07 100644
--- a/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_html.ts
+++ b/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_html.ts
@@ -32,6 +32,18 @@ export const htmlTemplate = html`
background-color: var(--status-abandoned);
color: var(--status-abandoned);
}
+ :host(.deferred) .chip {
+ background-color: var(--status-deferred);
+ color: var(--status-deferred);
+ }
+ :host(.integrating) .chip {
+ background-color: var(--status-integrating);
+ color: var(--status-integrating);
+ }
+ :host(.staged) .chip {
+ background-color: var(--status-staged);
+ color: var(--status-staged);
+ }
:host(.wip) .chip {
background-color: var(--status-wip);
color: var(--status-wip);
diff --git a/polygerrit-ui/app/styles/themes/app-theme.ts b/polygerrit-ui/app/styles/themes/app-theme.ts
index 8b00a79a46..c8dd8b5543 100644
--- a/polygerrit-ui/app/styles/themes/app-theme.ts
+++ b/polygerrit-ui/app/styles/themes/app-theme.ts
@@ -251,6 +251,9 @@ const styleSheet = safeStyleSheet`
/* status colors */
--status-merged: var(--green-700);
--status-abandoned: var(--gray-700);
+ --status-deferred: #5f6368;
+ --status-integrating: #999900;
+ --status-staged: #cccc00;
--status-wip: #795548;
--status-private: var(--purple-500);
--status-conflict: var(--red-600);
diff --git a/polygerrit-ui/app/styles/themes/dark-theme.ts b/polygerrit-ui/app/styles/themes/dark-theme.ts
index 05c6b7df2f..7415e34669 100644
--- a/polygerrit-ui/app/styles/themes/dark-theme.ts
+++ b/polygerrit-ui/app/styles/themes/dark-theme.ts
@@ -149,6 +149,9 @@ function getStyleEl() {
/* status colors */
--status-merged: var(--green-400);
--status-abandoned: var(--gray-300);
+ --status-deferred: #dadce0;
+ --status-integrating: #999900;
+ --status-staged: #cccc00;
--status-wip: #bcaaa4;
--status-private: var(--purple-200);
--status-conflict: var(--red-300);
diff --git a/polygerrit-ui/app/utils/access-util.ts b/polygerrit-ui/app/utils/access-util.ts
index 165eacf501..85131e607c 100644
--- a/polygerrit-ui/app/utils/access-util.ts
+++ b/polygerrit-ui/app/utils/access-util.ts
@@ -42,6 +42,7 @@ export enum AccessPermissionId {
SUBMIT_AS = 'submitAs',
TOGGLE_WIP_STATE = 'toggleWipState',
VIEW_PRIVATE_CHANGES = 'viewPrivateChanges',
+ QT_STAGE = 'stage',
PRIORITY = 'priority',
}
@@ -147,6 +148,10 @@ export const AccessPermissions: {[id: string]: AccessPermission} = {
id: AccessPermissionId.VIEW_PRIVATE_CHANGES,
name: 'View Private Changes',
},
+ [AccessPermissionId.QT_STAGE]: {
+ id: AccessPermissionId.QT_STAGE,
+ name: 'Stage',
+ },
};
export interface AccessPermission {
diff --git a/polygerrit-ui/app/utils/change-util.ts b/polygerrit-ui/app/utils/change-util.ts
index 278e7f3297..b43f427fa0 100644
--- a/polygerrit-ui/app/utils/change-util.ts
+++ b/polygerrit-ui/app/utils/change-util.ts
@@ -145,7 +145,8 @@ export function changeIsMerged(change?: ChangeInfo | ParsedChangeInfo | null) {
export function changeIsAbandoned(
change?: ChangeInfo | ParsedChangeInfo | null
) {
- return change?.status === ChangeStatus.ABANDONED;
+ return change?.status === ChangeStatus.ABANDONED ||
+ change?.status === ChangeStatus.DEFERRED;
}
export function changeStatuses(
@@ -157,6 +158,12 @@ export function changeStatuses(
states.push(ChangeStates.MERGED);
} else if (change.status === ChangeStatus.ABANDONED) {
states.push(ChangeStates.ABANDONED);
+ } else if (change.status === ChangeStatus.DEFERRED) {
+ states.push(ChangeStates.DEFERRED);
+ } else if (change.status === ChangeStatus.INTEGRATING) {
+ states.push(ChangeStates.INTEGRATING);
+ } else if (change.status === ChangeStatus.STAGED) {
+ states.push(ChangeStates.STAGED);
} else if (
change.mergeable === false ||
(opt_options && opt_options.mergeable === false)
diff --git a/polygerrit-ui/app/utils/message-util.ts b/polygerrit-ui/app/utils/message-util.ts
index 70dd286a71..7c236afed9 100644
--- a/polygerrit-ui/app/utils/message-util.ts
+++ b/polygerrit-ui/app/utils/message-util.ts
@@ -26,7 +26,12 @@ function getRevertChangeIdFromMessage(msg: ChangeMessageInfo): ChangeId {
}
export function getRevertCreatedChangeIds(messages: ChangeMessageInfo[]) {
- return messages
- .filter(m => m.tag === MessageTag.TAG_REVERT)
- .map(m => getRevertChangeIdFromMessage(m));
+ try {
+ return messages
+ .filter(m => m.tag === MessageTag.TAG_REVERT)
+ .map(m => getRevertChangeIdFromMessage(m));
+ }
+ catch(err) {
+ return [];
+ }
}
diff --git a/tools/workspace_status.py b/tools/workspace_status.py
index bedc051f28..9615bef765 100644
--- a/tools/workspace_status.py
+++ b/tools/workspace_status.py
@@ -35,7 +35,7 @@ def revision(directory, parent):
os.chdir(parent)
-print("STABLE_BUILD_GERRIT_LABEL %s" % revision(ROOT, ROOT))
+print("STABLE_BUILD_GERRIT_LABEL %s-QtFork" % revision(ROOT, ROOT))
for kind in ['modules', 'plugins']:
kind_dir = os.path.join(ROOT, kind)
for d in os.listdir(kind_dir):