144 Commits

Author SHA1 Message Date
Tao Zhou
ada0dd312f Add useGoogleFonts as a param to allow load fonts from google fonts cdn
Change-Id: Ic77562fb45360505134348a004ad85846ff1f18a
2020-01-09 09:32:11 +00:00
Gal Paikin
100bf60712 Change RevertSubmission's subject for revert of reverts
Currently, if a user tries reverting a submission, the subject for all
changes of that new revert submission will be 'Revert "Change x"'.
Also, if you try to revert that newly created submission, the subject
for all changes of that new revert submission will be 'Revert "Revert
"Change x""' (while "Change x" depends on the change).

This is clearly not good, since it doesn't scale well with 2 or more
reverts. This change makes it so that it never shows "Revert Revert" for
changes, but rather changes the convention to "Revert^N". E.g, instead
of 'Revert "Revert "Change x""' the subject is 'Revert^2 "Change x"'.

Also, the limit for length of subject was reduced by 3 to 60 max length
to account for the addition of "^NN" in the subject.

Another problem is the fact that Git's default for Git Revert is the same
as the current behavior in Gerrit ("Revert Revert Change X"). I'm trying
to get in touch with them to change the default behavior. For now, it's
okay if I make this change specifically for RevertSubmission, and keep
Revert functionality for both Git and Gerrit consistent (the cost
is that Revert Submission and Revert are not very consistent this way).

Change-Id: Id5e4b9ab20165548b24aec9b9046ff5a9a9c4e7b
2019-12-27 12:25:05 +01:00
David Pursehouse
3e05a05372 Merge branch 'stable-3.0' into stable-3.1
* stable-3.0:
  Update highlight.js to include soy
  Update building docs for building highlight.js
  config-gerrit: Remove superfluous quote mark
  Stop query from executing if predicate is empty
  Highlight jinja2 syntax
  Highlight Jenkinsfile as groovy
  Update highlight.js
  Verify Gerrit changes also on NoteDb
  Don't sort messages returned by Jenkins
  Fix string formatting in Jenkinsfile
  Fix RejectedAccessException during posting checks in Jenkinsfile
  Remove unnecessary SCM checkout from Jenkinsfile
  Fix expected response code when posting checks in Jenkinsfile
  Use basic auth for posting checks
  Add Jenkinsfile for verification pipeline

Change-Id: Id78327e509ab6a93f63b5929dc7408c219903376
2019-10-22 14:52:59 +09:00
David Pursehouse
c42ba05917 Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Update highlight.js to include soy
  Update building docs for building highlight.js
  config-gerrit: Remove superfluous quote mark
  Stop query from executing if predicate is empty
  Highlight jinja2 syntax
  Highlight Jenkinsfile as groovy
  Update highlight.js
  Verify Gerrit changes also on NoteDb
  Don't sort messages returned by Jenkins
  Fix string formatting in Jenkinsfile
  Fix RejectedAccessException during posting checks in Jenkinsfile
  Remove unnecessary SCM checkout from Jenkinsfile
  Fix expected response code when posting checks in Jenkinsfile
  Use basic auth for posting checks
  Add Jenkinsfile for verification pipeline

Remove the reviewDb build from Jenkinsfile.

Change-Id: I48f1fd6c19f87a55cb838955c5edbfb40f7db68f
2019-10-22 10:58:12 +09:00
David Pursehouse
d1d07c7699 Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  Highlight jinja2 syntax
  Highlight Jenkinsfile as groovy
  Verify Gerrit changes also on NoteDb
  Don't sort messages returned by Jenkins
  Fix string formatting in Jenkinsfile
  Fix RejectedAccessException during posting checks in Jenkinsfile
  Remove unnecessary SCM checkout from Jenkinsfile
  Fix expected response code when posting checks in Jenkinsfile
  Use basic auth for posting checks
  Add Jenkinsfile for verification pipeline

Change-Id: I5f22af9db17fcd2397cf039b33b6d6a446844cdc
2019-10-21 08:12:15 +09:00
David Ostrovsky
37159870d3 Clean up Polymer1 and Polymer2 separation
Change-Id: I58a2bb3781ddd6080dec4f3e44a7f3ae8e1c219d
2019-10-18 09:27:35 +02:00
Tao Zhou
4e792933c7 Disable font loading for paper-styles
Need to move it to soy template, as bundled js loads paper-tabs before gr-app.

Change-Id: Id844b093cd517912d698124117d1bc05330a4dc4
2019-10-16 11:29:39 +02:00
Tao Zhou
f920648fd0 gr-app-p2 is still needed for google hosts
Change-Id: Idc3ec6787507781706d438ed161cc311438a8e52
2019-10-15 17:09:31 +02:00
Tao Zhou
84f0797804 Switch from Polymer 1 to Polymer 2
Bug: Issue 4699
Change-Id: Ie6ba626a79eeef05798c23228ce7cff94a45e0a0
2019-10-15 13:52:17 +02:00
David Pursehouse
25084d108b Merge branch 'stable-3.0'
* stable-3.0:
  Upgrade JGit to 5.3.6.201910020505-r
  Bazel: Bump bazel version to 1.0.0
  Syntax highlighting: associate *.cproj and *.xaml as xml
  Upgrade JGit to 5.1.12.201910011832-r

Change-Id: Iab58c9044db0aac594bf46a29694cf0d04d0f7d0
2019-10-11 13:07:14 +09:00
David Pursehouse
04896eef26 Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Bazel: Bump bazel version to 1.0.0
  Syntax highlighting: associate *.cproj and *.xaml as xml
  Upgrade JGit to 5.1.12.201910011832-r

The change "Upgrade JGit to 5.1.12.201910011832-r" is intentionally
omitted in this merge since we use a different major release on the
stable-3.0 branch.

Change-Id: Ice7098a5ede220c0d2122a1d7d76a481c5b1726d
2019-10-11 08:31:59 +09:00
Sven Selberg
15cee48e21 Syntax highlighting: associate *.cproj and *.xaml as xml
highlight.js doesn't seem to support these exact languages, but they
are xml so it's more useful than having no syntax hightlighting.

https://fileinfo.com/extension/csproj
https://fileinfo.com/extension/xaml

Change-Id: Ib5cb6678ac853928c688a08435b459c87d063641
2019-10-10 13:54:56 +02:00
Paladox
b85a4d41eb Merge branch 'stable-3.0'
* stable-3.0:
  Highlight svg as xml
  Fix some corner cases with the download dropdown
  Update highlight.js

Change-Id: I8ef5b8c5099d85ead7b43633b7a11f1a89b1fdb7
2019-10-09 20:44:38 +01:00
Paladox
53df2e9fff Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Highlight svg as xml
  Fix some corner cases with the download dropdown
  Update highlight.js

Change-Id: Iec2bc764162f42990b4ab089fb3cd782eb76a846
2019-10-09 20:43:38 +01:00
Paladox none
17051974d6 Highlight svg as xml
This is safe as its not executing the syntax rather its just highlighting.

Change-Id: Ia55c9634ecad4e5e7150df8010285c0172b2778a
2019-10-09 17:17:47 +00:00
David Pursehouse
5d1d2cfb8a Merge "Rename "slave" to "replica" in documentation and command-line" 2019-09-26 23:09:43 +00:00
Han-Wen Nienhuys
348a6030c7 Rename "slave" to "replica" in documentation and command-line
Per
https://en.wikipedia.org/wiki/Master/slave_(technology)#Terminology_concerns
the use "slave" is considered offsensive in some circles.

For compatibility reasons, the "container.slave" property is
maintained, and the --slave flag is an alias for --replica.

Change-Id: If57df22705dac9450c1cf9900f051d9123d7dd2c
2019-09-26 23:19:53 +02:00
Edwin Kempin
2354f191be Abandoned.soy: Fix comment
Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: I2e1689b4435cfc35f45d0c91c7caaaffeedc0b62
2019-09-25 14:05:38 +02:00
David Ostrovsky
1cb260eb64 Merge branch 'stable-3.0'
* stable-3.0:
  Load proto_library from @rules_proto//proto:defs.bzl
  Update git submodules
  Set version to 3.0.3-SNAPSHOT
  Use --header-text-color css variable for some classes in gr-main-header
  Bazel: Add fixes for --incompatible_load_{java|python}_rules_from_bzl
  Bazel: Bump minimum supported version to 0.29.0
  Lucene index configuration and docs.

Change-Id: I82a153e2d3c3fede0347d2a870025143288721e6
2019-09-05 10:14:43 +02:00
David Pursehouse
726b4cc796 Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Load proto_library from @rules_proto//proto:defs.bzl
  Update git submodules
  Bazel: Add fixes for --incompatible_load_{java|python}_rules_from_bzl
  Bazel: Bump minimum supported version to 0.29.0
  Lucene index configuration and docs.

Change-Id: I401c192096047dd5069be37f17c4a62a8ed3afb7
2019-09-05 08:17:48 +09:00
David Pursehouse
31c82401f0 Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  Bazel: Add fixes for --incompatible_load_{java|python}_rules_from_bzl
  Bazel: Bump minimum supported version to 0.29.0
  Lucene index configuration and docs.

Change-Id: I6c597cbc89fafece83c374e9b36c4c4c0126704f
2019-09-04 16:35:55 +09:00
David Pursehouse
13a5793b81 Merge branch 'stable-3.0'
* stable-3.0:
  Expose Gerrit's GWT client library in the plugin API
  Replace usage of Iterables.limit with Java 8 Stream API
  Follow up to "Adapt gerrit.sh script to work on Alpine Linux"

Change-Id: I6b70578cf3f5a5599e521e46d794c586639d7bc9
2019-07-14 10:16:42 +09:00
Marco Miller
5a2c360dcf Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Expose Gerrit's GWT client library in the plugin API
  Replace usage of Iterables.limit with Java 8 Stream API
  Follow up to "Adapt gerrit.sh script to work on Alpine Linux"

Change-Id: I0b9ea803ade5673030a06b112c30996a72735a8e
2019-07-13 11:40:10 -04:00
David Pursehouse
7b856b1834 Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  Expose Gerrit's GWT client library in the plugin API
  Replace usage of Iterables.limit with Java 8 Stream API
  Follow up to "Adapt gerrit.sh script to work on Alpine Linux"

Change-Id: If66c0dd7f912e4551a6855c3cf299ed2586873dc
2019-07-13 10:30:36 +09:00
David Pursehouse
6f7f97d1c6 Merge branch 'stable-3.0'
* stable-3.0:
  Fix transitive load of GWT_PLUGIN_DEPS for in-tree plugin builds
  Bazel: Move PLUGIN_DEPS_NEVERLINK declaration to plugin.bzl
  Adapt gerrit.sh script to work on Alpine Linux
  Make wording of "Merged" html and text templates consistent
  Update git submodules
  Online index upgrade: skip submit rules for closed changes
  BaseInit: Don't throw if schema cannot be upgraded

Change-Id: Iaa6435d06d8a0c254dc36794fe9ff2a7950c0dba
2019-07-11 09:38:50 +09:00
David Pursehouse
690191b34a Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Fix transitive load of GWT_PLUGIN_DEPS for in-tree plugin builds
  Bazel: Move PLUGIN_DEPS_NEVERLINK declaration to plugin.bzl
  Adapt gerrit.sh script to work on Alpine Linux
  Make wording of "Merged" html and text templates consistent
  Online index upgrade: skip submit rules for closed changes
  BaseInit: Don't throw if schema cannot be upgraded

Change-Id: Id6a6034c6a2bcd1456d0b6095ef023c402388be1
2019-07-11 09:04:53 +09:00
David Pursehouse
565f7f820e Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  Fix transitive load of GWT_PLUGIN_DEPS for in-tree plugin builds
  Bazel: Move PLUGIN_DEPS_NEVERLINK declaration to plugin.bzl
  Adapt gerrit.sh script to work on Alpine Linux

Change-Id: Ica5ef5b8ff76c43515ca58e4bce13bee5c341d68
2019-07-11 08:18:55 +09:00
David Pursehouse
14d5609992 Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  Make wording of "Merged" html and text templates consistent
  BaseInit: Don't throw if schema cannot be upgraded

Change-Id: If5f1230a893c644b07b899aa1e1403c01cc5f6d5
2019-07-10 19:52:39 +09:00
Milutin Kristofic
bb65ab52aa Remove preloading gr-app.js, since it is not used
Change-Id: I3b578a81821db3769c19e628dfc3f53c3318dab7
2019-07-08 11:21:35 +02:00
Ben Rohlfs
c5d31369fb Only enable Polymer 2 polyfills on demand
After consulting Polymer experts we have come to the conclusion that
enabling polyfills does not gain us anything during the Polymer 2
migration.

Change-Id: I5376b4ec10d295304d2ea5d4365e4bf12dbe9822
2019-07-02 23:35:07 +02:00
Marco Miller
9552ba0ed5 Merge branch 'stable-3.0'
* stable-3.0:
  ReceiveCommits: Don't instantiate BranchCommitValidator repeatedly
  ElasticVersionTest: Add missing version 7.1 asserts
  ElasticVersionTest: Improve test method ordering
  ElasticVersionTest: Make test method names accurate
  Upgrade gitiles to 0.2-10
  PermissionRange: Interpret allowMin > allowMax as disallow
  Fix formatting issue in project config documentation
  ReceiveCommits: Validate ref operation before commits for non-ff case
  Add test coverage for ref operation validation extension point
  Allow CommitValidationListener to ignore 'skip validation' push option
  Upgrade JGit to 4.11.8.201904181247-r
  CreateProject: Expose createProject method
  ElasticContainer: Switch to Alpine-based images from blacktop
  DeleteVote.soy: Make wording consistent with DeleteVoteHtml.soy
  DeleteVote.soy add missing review URL
  Update git submodules
  NewChange.soy: add missing closing parenthesis
  Remove use of "NoteDB" config in PolyGerrit
  Always show "NoteDB" config under gr-repo
  Fix hiding "enable signed push" and "require signed push" under gr-repo
  Update git submodules
  gerrit.sh: Fix message about JRE
  Allow CommitValidationListener to ignore 'skip validation' push option
  ChangeEmail: Stop using deprecated SoyListData and SoyMapData
  IndexServlet: Stop using deprecated SoyMapData
  Bazel: Fix lint warning flagged by buildifier

Change-Id: Icadfa2bb77929e0aa5118ea8492fdb24e0e9aa7e
2019-06-27 13:03:17 -04:00
Marco Miller
ff50a286ed Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  ElasticVersionTest: Add missing version 7.1 asserts
  ElasticVersionTest: Improve test method ordering
  ElasticVersionTest: Make test method names accurate
  ReceiveCommits: Validate ref operation before commits for non-ff case
  Add test coverage for ref operation validation extension point
  Allow CommitValidationListener to ignore 'skip validation' push option
  Upgrade JGit to 4.11.8.201904181247-r
  CreateProject: Expose createProject method
  ElasticContainer: Switch to Alpine-based images from blacktop
  DeleteVote.soy: Make wording consistent with DeleteVoteHtml.soy
  DeleteVote.soy add missing review URL
  NewChange.soy: add missing closing parenthesis
  Update git submodules
  gerrit.sh: Fix message about JRE
  Allow CommitValidationListener to ignore 'skip validation' push option
  Bazel: Fix lint warning flagged by buildifier

Change-Id: I5ca13ae4495265592ac07381bc97370ec025d3f5
2019-06-26 16:45:31 -04:00
David Pursehouse
31fbf567d3 DeleteVote.soy: Make wording consistent with DeleteVoteHtml.soy
Change-Id: I9bf12cdc2347a1607d783889f710cc836cf77a20
2019-06-22 09:37:21 +09:00
Jacek Centkowski
f7741fabd7 DeleteVote.soy add missing review URL
All the other review related templates (including DeleteVoteHtml.soy)
contain review URL, hence it was added to this one too.

Change-Id: Ice904d315841f7fe90e4f1567af092324f535b2d
Signed-off-by: Jacek Centkowski <jcentkowski@collab.net>
2019-06-22 09:35:36 +09:00
Jacek Centkowski
9bb9f0af36 NewChange.soy: add missing closing parenthesis
Change-Id: I91c6be30c6db8b3ce0dbe4a773034894bba624a9
Signed-off-by: Jacek Centkowski <jcentkowski@collab.net>
2019-06-21 18:51:40 +02:00
David Pursehouse
09ed5b778f Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  gerrit.sh: Fix message about JRE
  Allow CommitValidationListener to ignore 'skip validation' push option

The change "Allow CommitValidationListener to ignore 'skip validation'
push option" is omitted from this merge as it requires non-trivial fixes
to make it work on stable-2.16. It will be re-done separately in a follow
up commit, to make it easier to review.

Change-Id: I2930c972c3db4eaae6a025a43753145d8aad94ba
2019-06-21 09:52:44 +09:00
Joerg Zieren
800a351e30 Merge changes from topic "comment-validation"
* changes:
  Validate comments in MailProcessor using new interface
  Validate comments in ReceiveCommits using new interface
  Validate comments and message in PostReview using new interface
  Add extension point for plugins to validate comments before publishing
2019-06-17 07:01:43 +00:00
David Pursehouse
170b0d2edf Merge branch 'stable-3.0'
* stable-3.0:
  Highlight .mjs as javascript
  Set version to 2.15.15-SNAPSHOT
  Update buildifier to 0.26

Change-Id: I37f28ca8c35980ec61ee12c4c9e24ea602df6cf2
2019-06-15 18:56:56 +09:00
David Pursehouse
9967e1f0dc Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Highlight .mjs as javascript
  Set version to 2.15.15-SNAPSHOT
  Update buildifier to 0.26

Change-Id: I98261be3f7e48747401e9cff45bb3314288c40d4
2019-06-15 18:55:35 +09:00
Joerg Zieren
e18c1dee2a Validate comments in MailProcessor using new interface
Adds logic to MailProcessor to validate all comments received via email.

Test case covers acceptance (existing tests) and rejection (new tests)
as well as distinction between inline/file/change message comments.

Change-Id: Iad889893cd3007c18aa36103fe1bd96491fdb8d8
2019-06-14 16:57:08 +02:00
Paladox none
c0bb45f37b Highlight .mjs as javascript
Bug: Issue 11020
Change-Id: I42927f81206df10347a266b4778e813f8c5c96d2
2019-06-13 13:17:22 +00:00
Ben Rohlfs
8bc84cb475 Fork a Polymer 2 version of gr-app
The webserver can then serve both versions depending on e.g. a URL
parameter.

Change-Id: I385a1937357077a6c8fa1d54818ab0afb827728b
2019-06-13 15:16:04 +02:00
Ben Rohlfs
78e6f24ceb Force all polyfills for Polymer 2
Change-Id: I328cd0759ef998ba09971cb6ccbfde718239fff6
2019-06-07 09:47:39 +00:00
David Pursehouse
fa0639f3a0 Merge branch 'stable-3.0'
* stable-3.0:
  ReviewersUtil: Increase multiplier for candidate list to 3
  Add missing 'Allow content merges' section title in project config documentation
  Fix placement of footer and searchbox in config-project-config.txt
  AbstractQueryChangesTest: Open TestRepository in try-with-resource
  TestRepository: Fix resource leak flagged by Eclipse
  Update git submodules
  Update git submodules
  Accept more than one endpoint from the same plugin
  mvn.py: Explicitly specify version in mvn deploy command
  Add missing 'Allow content merges' section title in project config documentation
  Allow to disable log file compression
  Allow to disable log file rotation
  SystemLog: Don't keep Config as a member
  Remove mention of the offline migrator being in 3.0
  AccountIT#deletePreferredEmail: Fix flakiness
  gerrit.sh: Fix PID definition
  Upgrade gitiles to 0.2-9
  Use Provider<PersonIdent> in CreateProject @Singleton
  AccountIT: Add test for deleting preferred email
  AccountIT: Add test coverage of adding an email and setting preferred

Change-Id: I76b25cf1201d13025fa566b893c3fd02fbf212a0
2019-06-05 19:43:50 +09:00
David Pursehouse
b91153702a Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Update git submodules
  Accept more than one endpoint from the same plugin
  mvn.py: Explicitly specify version in mvn deploy command
  Add missing 'Allow content merges' section title in project config documentation
  Allow to disable log file compression
  Allow to disable log file rotation
  SystemLog: Don't keep Config as a member
  AccountIT#deletePreferredEmail: Fix flakiness
  gerrit.sh: Fix PID definition
  Use Provider<PersonIdent> in CreateProject @Singleton
  AccountIT: Add test for deleting preferred email
  AccountIT: Add test coverage of adding an email and setting preferred

Change-Id: I56efcb5dcc09472b2c18e26be1feae62b9811eb9
2019-06-05 12:11:11 +09:00
David Pursehouse
4c81ce2eaf Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  gerrit.sh: Fix PID definition
  AccountIT: Add test for deleting preferred email
  AccountIT: Add test coverage of adding an email and setting preferred

Adjust AccountIT#deletePreferredEmail to the different behavior on this
branch: the account is not reindexed twice when the preferred email is
deleted.

Change-Id: Icffba48df458f303f261a2189d3baa942d397fb8
2019-06-03 10:40:08 +09:00
Patrick Hiesel
d06b463ad7 Merge "Ship initally required data in index.html" 2019-05-29 13:32:30 +00:00
Patrick Hiesel
6e2425deee Remove unused deprecateGwtUi parameter
Change-Id: I5c81f17a948137b6185a4da446d55474d3df3d55
(cherry picked from commit 66bf4c50daf8f0f3dd53214d1b92d7dbb945a078)
2019-05-29 13:32:19 +00:00
Patrick Hiesel
66bf4c50da Remove unused deprecateGwtUi parameter
Change-Id: I5c81f17a948137b6185a4da446d55474d3df3d55
2019-05-29 11:48:21 +00:00
Patrick Hiesel
61f54a0a09 Ship initally required data in index.html
Gerrit's UI dispatches a number of requests to the server when it
initially loads. These are to obtain server configs, server version and
account data. These round trips add additional time when the App starts.

This commit ships the most relevant data in-line directly in index.html.
On the server, this is almost for free because when rendering
index.html, we already authenticated the user, so inline this data is
cheap. The server information is static, so it is also cheap to inline.

We expect this to help reduce the App's startup on slow networks.

We render the data using Gson and Soy. Soy has a predefined ordainer to
render JSON data. We use this to safely escape values.

Change-Id: I8e9cc077fa7212ca782b1ec334d41b872a3fd470
2019-05-28 10:46:58 +02:00