From 5af9b3bfb7224cc7e3e2338d69c7df597657519f Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 25 Mar 2020 16:30:33 +0100 Subject: Add a warning if submitting a change with an open change edit Bug: Issue 12287 Change-Id: I25aa799a69d0fcce1db55d9d1ed87675a6d3f1fb (cherry picked from commit a36f08348aaab175cab001d6f50be1db903a6d7b) --- .../gr-confirm-submit-dialog.html | 5 ++++ .../gr-confirm-submit-dialog.js | 5 ++++ .../gr-confirm-submit-dialog_test.html | 27 +++++++++++++++++++++- 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.html b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.html index 1036b7fbcc..b9c32ed570 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.html +++ b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.html @@ -53,6 +53,11 @@ limitations under the License. + diff --git a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.js index 93d38df33d..55c5c672e8 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.js @@ -54,6 +54,11 @@ this.$.dialog.resetFocus(); }, + _computeHasChangeEdit(change) { + return !!change.revisions && + Object.values(change.revisions).some(rev => rev._number == 'edit'); + }, + _handleConfirmTap(e) { e.preventDefault(); this.dispatchEvent(new CustomEvent('confirm', {bubbles: false})); diff --git a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog_test.html b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog_test.html index 86c15f6a6e..dd61d1c1c9 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog_test.html +++ b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog_test.html @@ -50,7 +50,10 @@ limitations under the License. test('display', () => { element.action = {label: 'my-label'}; - element.change = {subject: 'my-subject'}; + element.change = { + subject: 'my-subject', + revisions: {}, + }; flushAsynchronousOperations(); const header = element.$$('.header'); assert.equal(header.textContent.trim(), 'my-label'); @@ -59,5 +62,27 @@ limitations under the License. assert.notEqual(message.textContent.length, 0); assert.notEqual(message.textContent.indexOf('my-subject'), -1); }); + + test('_computeHasChangeEdit', () => { + const change = { + revisions: { + d442ff05d6c4f2a3af0eeca1f67374b39f9dc3d8: { + _number: 'edit', + }, + }, + unresolved_comment_count: 0, + }; + + assert.equal(element._computeHasChangeEdit(change), true); + + const change2 = { + revisions: { + d442ff05d6c4f2a3af0eeca1f67374b39f9dc3d8: { + _number: 2, + }, + }, + }; + assert.equal(element._computeHasChangeEdit(change2), false); + }); }); -- cgit v1.2.3 From 5d6ca055210944851312d935aa405a38282229a6 Mon Sep 17 00:00:00 2001 From: Paladox none Date: Thu, 19 Nov 2020 22:21:32 +0000 Subject: Use strict equality This was done in another commit [1]. [1] https://gerrit-review.googlesource.com/c/gerrit/+/281526/3/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.ts#71 Change-Id: I2ae7435922b55a4e5f5422b73a65bc83c44cdf94 --- .../change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.js index 55c5c672e8..282b394b50 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.js @@ -56,7 +56,7 @@ _computeHasChangeEdit(change) { return !!change.revisions && - Object.values(change.revisions).some(rev => rev._number == 'edit'); + Object.values(change.revisions).some(rev => rev._number === 'edit'); }, _handleConfirmTap(e) { -- cgit v1.2.3 From 7e22ca2291656d1949f56ed1cdc00f0a54267656 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Tue, 10 Nov 2020 09:48:10 -0800 Subject: Fix bazel run_shell usage for newer versions The Bazel option `--incompatible_run_shell_command_string` is going to be flipped to true in upcoming Bazel 4.0 release per default, see: [1] for more details. Test Plan: bazel build :release [1] https://github.com/bazelbuild/bazel/issues/5903 Bug: Issue 13612 Change-Id: Icc9589906198386b1e4805ceeabbb420a7ea1afb (cherry picked from commit c1f4e91406b9da411dd2f5eab4ee92bfc761e1f4) --- tools/bzl/asciidoc.bzl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/bzl/asciidoc.bzl b/tools/bzl/asciidoc.bzl index 1e7ec96ce3..7977cf051d 100644 --- a/tools/bzl/asciidoc.bzl +++ b/tools/bzl/asciidoc.bzl @@ -18,8 +18,7 @@ def documentation_attributes(): ] def _replace_macros_impl(ctx): - cmd = [ - ctx.file._exe.path, + args = [ "--suffix", ctx.attr.suffix, "-s", @@ -28,13 +27,14 @@ def _replace_macros_impl(ctx): ctx.outputs.out.path, ] if ctx.attr.searchbox: - cmd.append("--searchbox") + args.append("--searchbox") else: - cmd.append("--no-searchbox") - ctx.actions.run_shell( + args.append("--no-searchbox") + ctx.actions.run( inputs = [ctx.file._exe, ctx.file.src], outputs = [ctx.outputs.out], - command = cmd, + executable = ctx.file._exe.path, + arguments = args, use_default_shell_env = True, progress_message = "Replacing macros in %s" % ctx.file.src.short_path, ) -- cgit v1.2.3 From 401e01fd0605689129a159dc8188c0ebf91cdf31 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Thu, 26 Nov 2020 23:57:30 +0100 Subject: Upgrade JGit to 5.3.8.202011260953-r This version contains the following fix: Ensure that GC#deleteOrphans respects pack lock If pack or index files are guarded by a pack lock (.keep file) deleteOrphans() should not touch the respective files protected by the lock file. Otherwise it may interfere with PackInserter concurrently inserting a new pack file and its index. Release Notes: https://projects.eclipse.org/projects/technology.jgit/releases/5.1.14 Bug: Issue 13544 Change-Id: I81272f4cac9923b63b0966bcf227325efbf7d0e9 --- lib/jgit/jgit.bzl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/jgit/jgit.bzl b/lib/jgit/jgit.bzl index db0e1e153f..47fc643fe1 100644 --- a/lib/jgit/jgit.bzl +++ b/lib/jgit/jgit.bzl @@ -1,6 +1,6 @@ load("//tools/bzl:maven_jar.bzl", "MAVEN_CENTRAL", "maven_jar") -_JGIT_VERS = "5.3.7.202002110540-r" +_JGIT_VERS = "5.3.8.202011260953-r" _DOC_VERS = _JGIT_VERS # Set to _JGIT_VERS unless using a snapshot @@ -40,25 +40,25 @@ def jgit_maven_repos(): name = "jgit-lib", artifact = "org.eclipse.jgit:org.eclipse.jgit:" + _JGIT_VERS, repository = _JGIT_REPO, - sha1 = "b1714d4917750d6fad0d19d3b0e258b373db819a", + sha1 = "f34c7c9e0ffaf8ba9e5af00e299e51f70931a833", ) maven_jar( name = "jgit-servlet", artifact = "org.eclipse.jgit:org.eclipse.jgit.http.server:" + _JGIT_VERS, repository = _JGIT_REPO, - sha1 = "cf61e6e00a758a6f33995e53883aede76d3b2400", + sha1 = "f9517712c741660cd199311a4eb27584dd8d03f6", ) maven_jar( name = "jgit-archive", artifact = "org.eclipse.jgit:org.eclipse.jgit.archive:" + _JGIT_VERS, repository = _JGIT_REPO, - sha1 = "3c0b259040d3bc3a9e884a301055cf4f2e1bb1e2", + sha1 = "9adac724af047dfaa1e9061eeb34fbb14ebaefa9", ) maven_jar( name = "jgit-junit", artifact = "org.eclipse.jgit:org.eclipse.jgit.junit:" + _JGIT_VERS, repository = _JGIT_REPO, - sha1 = "f78409fb808c5a108c629ec3cba74cc6c14ebff2", + sha1 = "1c2dc9a93b30e3a6fb1fadb589f01f29343ec7d8", ) def jgit_dep(name): -- cgit v1.2.3 From 3deba8778f9bb416e36a1e769a07b054530d56cf Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Fri, 27 Nov 2020 10:25:46 +0100 Subject: Upgrade JGit to ad902087 This version contains the following fix: Ensure that GC#deleteOrphans respects pack lock If pack or index files are guarded by a pack lock (.keep file) deleteOrphans() should not touch the respective files protected by the lock file. Otherwise it may interfere with PackInserter concurrently inserting a new pack file and its index. Bug: Issue 13544 Change-Id: I7266f7b0c164826140726b939a647489902633b9 --- modules/jgit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/jgit b/modules/jgit index a79c5b1f10..ad90208782 160000 --- a/modules/jgit +++ b/modules/jgit @@ -1 +1 @@ -Subproject commit a79c5b1f1046f4b41928bc40ab433155168dacc6 +Subproject commit ad902087820c1b2b3147b45ffbac4e3804274f9c -- cgit v1.2.3 From e78e7154a1c2c14954cbc1adbb583815385c1eaa Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Fri, 27 Nov 2020 11:08:19 +0100 Subject: Upgrade JGit to d1801402 This version contains the following fix: Ensure that GC#deleteOrphans respects pack lock If pack or index files are guarded by a pack lock (.keep file) deleteOrphans() should not touch the respective files protected by the lock file. Otherwise it may interfere with PackInserter concurrently inserting a new pack file and its index. Bug: Issue 13544 Change-Id: Ib543e9b8f094b8065e9ba4174953ab52be6eb43e --- modules/jgit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/jgit b/modules/jgit index 9f3616dcb4..d1801402fe 160000 --- a/modules/jgit +++ b/modules/jgit @@ -1 +1 @@ -Subproject commit 9f3616dcb43246b883f9943af0de7cf67836c443 +Subproject commit d1801402fee871610e983846225afd6339ce8ffd -- cgit v1.2.3 From 9b076ae734a9417a43f2fa367e584a4076aaf434 Mon Sep 17 00:00:00 2001 From: Antonio Barone Date: Fri, 27 Nov 2020 14:17:32 +0100 Subject: Bump up jetty version to 9.4.33.v20201020 This version, in particular, fixes the bug: "Request without Host header fails with NullPointerException in ForwardedRequestCustomizer" [1] This bug caused Gerrit to throw a NullPointerException when serving forwarded http/1.0 requests having no `Host` header set. [1] https://github.com/eclipse/jetty.project/issues/5443 Bug: Issue 13752 Change-Id: I9f9f7df74f6d6c3996e044ba9883b2aa8951c209 --- WORKSPACE | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index e6d16c4688..454423a161 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -856,54 +856,54 @@ maven_jar( sha1 = "3e127311a86fc2e8f550ef8ee4abe094bbcf7e7e", ) -JETTY_VERS = "9.4.32.v20200930" +JETTY_VERS = "9.4.33.v20201020" maven_jar( name = "jetty-servlet", artifact = "org.eclipse.jetty:jetty-servlet:" + JETTY_VERS, - sha1 = "4253dd46c099e0bca4dd763fc1e10774e10de00a", + sha1 = "101609e8e5365c4406e4448099459eb605ac551f", ) maven_jar( name = "jetty-security", artifact = "org.eclipse.jetty:jetty-security:" + JETTY_VERS, - sha1 = "16a6110fa40e49050146de5f597ab3a3a3fa83b5", + sha1 = "c150bf2aca6cb1636e7195f844a2bb156546e50e", ) maven_jar( name = "jetty-server", artifact = "org.eclipse.jetty:jetty-server:" + JETTY_VERS, - sha1 = "d2d89099be5237cf68254bc943a7d800d3ee1945", + sha1 = "f586ff2ee048ad2575866c1833d854288f402307", ) maven_jar( name = "jetty-jmx", artifact = "org.eclipse.jetty:jetty-jmx:" + JETTY_VERS, - sha1 = "5e8e87a6f89b8eabf5b5b1765e3d758209001570", + sha1 = "56b723070eeafc51b943cd9bf1a064a037e806a7", ) maven_jar( name = "jetty-continuation", artifact = "org.eclipse.jetty:jetty-continuation:" + JETTY_VERS, - sha1 = "b46713a1b8b2baf951f6514dd621c5a546254d6c", + sha1 = "f672e58d528fc83060558ab4fc6a797c8137dfcb", ) maven_jar( name = "jetty-http", artifact = "org.eclipse.jetty:jetty-http:" + JETTY_VERS, - sha1 = "5fdcefd82178d11f895690f4fe6e843be69394b3", + sha1 = "ad28940f89ffde6ec1bd1656fe3f8493b01ba3c2", ) maven_jar( name = "jetty-io", artifact = "org.eclipse.jetty:jetty-io:" + JETTY_VERS, - sha1 = "0d0f32c3b511d6b3a542787f95ed229731588810", + sha1 = "9e4b0048285b71f4769908780f957a470eca11da", ) maven_jar( name = "jetty-util", artifact = "org.eclipse.jetty:jetty-util:" + JETTY_VERS, - sha1 = "efefd29006dcc9c9960a679263504287ce4e6896", + sha1 = "c88807f210ab216aa831b48569ef50bd797384bc", ) maven_jar( -- cgit v1.2.3