summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Set version to 3.2.13-SNAPSHOTupstream/stable-3.2-2021-07Luca Milanesio2021-08-185-5/+5
| | | | Change-Id: Ic9f8f677a17f662061e979a32c95c030d8be48d9
* Set version to 3.2.12v3.2.12Luca Milanesio2021-08-185-5/+5
| | | | Change-Id: I91c946f8ae62bf9d5f1200640409410568fbb118
* Merge branch 'stable-3.1-2021-07'Edwin Kempin2021-08-1210-20/+232
|\ | | | | | | | | | | | | | | | | | | * stable-3.1-2021-07: Update Gitiles plugin IncludedIn: filter out non-visible branches Point gitiles submodule to gitiles security fix repo Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I7298bc114f89564dbf019ea0bebbc10bc5575002
| * Update Gitiles pluginEdwin Kempin2021-08-051-0/+0
| | | | | | | | Change-Id: Iaccb4d3de3a701df383bcdc80afe27fbcf51f47d
| * Merge branch 'stable-3.1' into stable-3.1-2021-07Patrick Hiesel2021-08-0523-29/+54
| |\ | | | | | | | | | | | | | | | | | | | | | * stable-3.1: ProjectOperations: Add method to wipe all access sections Migrate to python 3 Change-Id: I610b2940a5e2bee716568529be745d63fa407bdd
| * \ Merge "Point gitiles submodule to gitiles security fix repo" into ↵Patrick Hiesel2021-08-021-1/+1
| |\ \ | | | | | | | | | | | | stable-3.1-2021-07
| | * | Point gitiles submodule to gitiles security fix repoPatrick Hiesel2021-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it so that we can release and test security fixes in the gitiles plugin. After this commit, git has changed the URL of the submodule: Submodule 'plugins/gitiles' (sso://gerrit/plugins/gitiles-security-fixes) registered for path 'plugins/gitiles' Submodule 'plugins/hooks' (sso://gerrit/plugins/hooks) registered for path 'plugins/hooks' Submodule 'plugins/plugin-manager' (sso://gerrit/plugins/plugin-manager) registered for path 'plugins/plugin-manager' Submodule 'plugins/replication' (sso://gerrit/plugins/replication) registered for path 'plugins/replication' Submodule 'plugins/reviewnotes' (sso://gerrit/plugins/reviewnotes) registered for path 'plugins/reviewnotes' Submodule 'plugins/singleusergroup' (sso://gerrit/plugins/singleusergroup) registered for path 'plugins/singleusergroup' Submodule 'plugins/webhooks' (sso://gerrit/plugins/webhooks) registered for path 'plugins/webhooks' Change-Id: Id340f5932b663bdd309a0dc69f35a679103a4274
| * | | IncludedIn: filter out non-visible branchesYoussef Elghareeb2021-07-168-19/+228
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The project's commit endpoint "Get Included In" returns the list of branches and tags in which a change is included. This endpoint only checked if the input commit is visible to the caller (see CommitsCollections), but didn't check for caller's visibility on branches and tags that are returned by this endpoint. In this change, we filter out branches and tags that are not visibile to the caller. Note: The NullAwareCorrespondence class was copied from master because we need it for the new test. Bug: Issue 14732 Change-Id: I66f5b72926501fe2482a0f7fc91032bbf2eac43b (cherry picked from commit 993378f07dad5e4fbcb4482ac97a98461e1b9743)
* | | Merge branch 'stable-3.1'Edwin Kempin2021-08-1225-685/+710
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | * stable-3.1: ProjectOperations: Add method to wipe all access sections Migrate to python 3 Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I0569ab5bc4374a6e40da873def0e478280f66f0f
| * | ProjectOperations: Add method to wipe all access sectionsPatrick Hiesel2021-08-053-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a method to the project test framework that allows us to wipe all access sections. This is useful when we want to test against a 'clean' and defined set of permissions that don't depend on Gerrit's default permissions. Change-Id: I63a85b4077834e170b53c93f14b05da929a6dda1 (cherry picked from commit 9c170519b3545e2f401969e7b0d5cde907263999)
| * | Migrate to python 3David Ostrovsky2021-08-0520-28/+28
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given that on most systems Python is still linked to the Python 2.7, switch explicitly to using Python 3. Python 2.7 was discontinued on January 1, 2020: [1]. Moreover, there is PEP recommending to use python3 in the shebang: [2]. [1] https://www.python.org/doc/sunset-python-2 [2] https://www.python.org/dev/peps/pep-0394 Change-Id: Ia4ca09e65a451868de738d3dba6f62fdd7c5e50d (cherry picked from commit 2b5fe095f9431e995b23d3517a052fa7f4c36638)
* | Merge "Prevent removing e-mail associated with OpenId accounts" into stable-3.2Clark Boylan2021-07-297-2/+179
|\ \
| * | Prevent removing e-mail associated with OpenId accountsClark Boylan2021-07-227-2/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement a Realm for OpenId accounts and override accountBelongsToRealm(). The new accountBelongsToRealm() implementation properly reports back if an external ID record belongs to an OpenId record. Without this users can delete their email associated with their OpenId account which also accidentally deletes their OpenId external ID record. When they log in next Gerrit creates a new account for them orphaning their actual account. Instead Gerrit should prevent the user from removing the email address associated with their OpenId account. If the user wants to delete this email address they will need to first update the email address on the OpenId side then login to update the email in their OpenId external ID record. Once that is done they can safely remove the email address from their account without orphaning the account. Bug: Issue 14776 Change-Id: I5ae8bc8cf98b0829c68840e66418999a17e48d60
* | | Merge "AccountPatchReview : fix mariadb status matching" into stable-3.2Edwin Kempin2021-07-201-1/+1
|\ \ \
| * | | AccountPatchReview : fix mariadb status matchingIan Wienand2021-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mariadb is currently using SQLException.getSQLState() (as used by getSQLStateInt()) which returns the ANSI SQLSTATE value, not the MariaDB/mysql error code [1]. The result is that the duplicate key detection doesn't work when using the mariadb connector. If you have already reviewed a file (or click "reviewed" in the file chooser) and then open it again you get a 500 error and a long backtrace including something like Caused by: java.sql.SQLIntegrityConstraintViolationException: (conn=13) Duplicate entry '3-1-1000001-file-3.txt' for key 'PRIMARY' We could either continue using getSQLState() and change this to "23000" (which covers all these values) or do as MySQL connector does and use the vendor-specific getErrorCode() call. I've taken the later approach here. [1] https://mariadb.com/kb/en/mariadb-error-codes/ Change-Id: I5762118ceb5628171b991a80fe701d160ab0d959
* | | | Fix deleting edits when change is mergedPaladox none2021-07-171-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes supporting deleting a change edit after change is merged or abandoned. This also improves the user interaction so a dialog is not shown because a change edit didn't exist on /commit?links. Rather we now write to the console log. This also has the benefit of making the redirect of /edit -> ,edit seamless because no more dialog showing and having to press close which could cause some confusion with the user. Since we're redirecting /edit -> ,edit anyways we don't need the dialog. Change-Id: I2e478d203ae7eb95acf92b518b73c9ad6b73c77d
* | | | Revert "Fix wrong edit url being used within gr-file-list-header"paladox2021-07-162-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 970899e0e7c05f3c71040241786270b9d83ec8fc. This broke it for when a change edit existed on a merged change. And also broke selecting a edit patchset in the selector. Change-Id: Ib1abd1d97bb24f8d4824bf7e5e70d81626fea3fd
* | | | Revert "Redirect /edit to ,edit"paladox2021-07-162-29/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fd06827951d5e69c1db653e8419cfd30a87a0d26. This broke it for when a change edit existed on a merged change. And also broke selecting a edit patchset in the selector. Change-Id: Ife339528e2b446ab21619670e021e58d738b5954
* | | | Redirect from change edit if change is merged or abandonedPaladox none2021-07-162-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also display a notification telling the user why. Change-Id: I9b8f9cf7da7992274fe05e46be481246543d4c57 (cherry picked from commit 24d5b0d01daa9963e56bb9ee7509213fb8554d97)
* | | | Limit returned changes for a triplet without Change-IdLuca Milanesio2021-07-143-2/+26
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When looking for a single change, do not perform a full scan of all changes on a repository/branch as they would not identify a single entry but rather limit the result to just 2 elements, which would be enough to identify the response. Fix a bug where invoking the REST-API /changes/repo~branch~ without mentioning the change-id resulted in the full scan of all changes on a repository/branch causing a high CPU overload and occupying the request threads for a long time. Requesting a single change by NOT specifying its change-id is not a valid use-case, and it should always return a 404, regardless of how many changes exist on the project/branch. Bug: Issue 14785 Change-Id: Ief77d199c917fea8ebaa6ecc44a7b4b2c59d6f4e
* | | Merge "Fix wrong edit url being used within gr-file-list-header" into stable-3.2Paladox none2021-07-092-0/+32
|\ \ \
| * | | Fix wrong edit url being used within gr-file-list-headerPaladox none2021-07-082-0/+32
| | | | | | | | | | | | | | | | | | | | Change-Id: I8164660fce02aa93dafef626c3a9697d17d82dfb (cherry picked from commit 4578fe42ffef9469289a0444808dd208f25eaf96)
* | | | Redirect /edit to ,editPaladox none2021-07-082-3/+29
|/ / / | | | | | | | | | | | | | | | | | | | | | We don't want to support /edit unless its diffing the bases, in which case we only redirect if the url exactly contains /edit. Change-Id: I08599c559bc7c8a07a284f137433bd1bd5483615 (cherry picked from commit 7a97194a5c7d1bf93f1d49d6a697804985e5d756)
* | | Fix edit url when savingPaladox none2021-07-072-11/+4
| | | | | | | | | | | | | | | | | | | | | It set /edit rather than ,edit. Change-Id: I4e8112e91b565875359f53bf9c8eb06b2670d14d (cherry picked from commit 622903a3f4955229cc27993b6d0353c40c8fe3a7)
* | | gr-download-commands: Make shell commands responsive accross screen sizesPaladox none2021-07-022-1/+3
| | | | | | | | | | | | | | | Change-Id: I1431c35857efa964042c46a48e53f446976853b5 (cherry picked from commit bfe52b70c9347b4e6c7c8c85cbdff0bdc8057ef2)
* | | Set version to 3.2.12-SNAPSHOTLuca Milanesio2021-07-015-5/+5
| | | | | | | | | | | | Change-Id: I2142c3f36533f10710cc8d13e203d4c9797dc5f8
* | | Set version to 3.2.11v3.2.11Luca Milanesio2021-07-015-5/+5
| | | | | | | | | | | | Change-Id: I145faa125838d1d4b22087946175010e90e622fc
* | | Merge "Fix drag and drop" into stable-3.2Paladox none2021-07-012-5/+18
|\ \ \
| * | | Fix drag and dropPaladox none2021-07-012-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes an issue where trying to drop a file into the drop box did not work. Instead it just opened the file in a separate tab instead of uploading. Also add support for uploading multiple files (only supported when dragging files in). Change-Id: Ib9d1cce7fb3bbc39f0a39fc3568138a6e9d59e90 (cherry picked from commit 39eb8dc656f909a1743d523f84a79ed90f66cad9)
* | | | Make gracefulStopTimeout match /bin/sh compliantAntonio Barone2021-07-011-5/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change Id3cb96f5ace introduced the ability to read {httpd,sshd}.gracefulStopTimeout values from gerrit.config and to convert them into seconds. However the implementation was relying on bash syntax. Make gerrit.sh compliant to Bourne Shell again, by removing bash specific pattern matching and by delegating to grep instead. Bug: Issue 14723 Change-Id: I8c1dc5cebd30eb7e9d639bc60d459ad8b154b3c9
* | | Merge "Honour {httpd,sshd}.gracefulStopTimeout in gerrit.sh" into stable-3.2Matthias Sohn2021-06-261-2/+41
|\ \ \
| * | | Honour {httpd,sshd}.gracefulStopTimeout in gerrit.shLuca Milanesio2021-06-251-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The httpd and sshd's gracefulStopTimeout values were not taken into consideration in gerrit.sh for the maximum time to wait for Gerrit to stop. The misalignment between the {httpd,sshd}.gracefulStopTimemout and the hardcoded 30 seconds in gerrit.sh was causing Gerrit to remove prematurely some incoming SSH and HTTPD connections and risking to killing a write operation. Read the timeout values from gerrit.config and convert them in seconds using a more limited implementation of getTimeUnit(). Bug: Issue 14613 Change-Id: Id3cb96f5ace75c2390d9fcfd00a81bf091e1d484
* | | | Elasticsearch: Discontinue EOL version 7.5 supportMarco Miller2021-06-223-6/+0
|/ / / | | | | | | | | | | | | | | | | | | | | | Remove support for elasticsearch V7_5, as it became EOL since June [1]. [1] https://www.elastic.co/support/eol Change-Id: I46cc3849a5cf1fad30b007fe09f8d1cdbe4d588b
* | | LocalUsernamesToLowerCase: manage duplication automaticallyLuca Milanesio2021-06-113-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When having two external-ids that are different just in their case, the LocalUsernamesToLowerCase should automatically remove one of them and only keep the lowercase version. Example for the same account id: gerrit:MyUsername gerrit:MyUSERNAME The above two external-ids would have caused a DuplicateExternalIdKeyException which is not helpful as both identities are the same and associated with the same account id and have the same associated property values: - email - password Automatically remove one of the two (or more) identities in conflict and display a warning message explaining what has just happened and how the situation has been managed transparently. NOTE: The duplicates that are getting removed are identical once they are converted to lowercase. The ones that are getting deleted are not relevant: the only thing that is important is that only one of them is kept, as all the others are identical. To test this change: Positive use-case: -- Before the LocalUsernamesToLowerCase execution: [externalId "gerrit:johndoe"] accountId = 1000000 email = john@doe.org [externalId "gerrit:JohnDoe"] accountId = 1000000 email = JOHN@doe.org After the LocalUsernamesToLowerCase execution, there is a single entry: [externalId "gerrit:johndoe"] accountId = 1000000 email = john@doe.org OR [externalId "gerrit:johndoe"] accountId = 1000000 email = JOHN@doe.org Negative use-cases: [externalId "gerrit:johndoe"] accountId = 1000000 [externalId "gerrit:JohnDoe"] accountId = 1000000 email = JOHN@doe.org The LocalUsernamesToLowerCase execution fails with a duplicated ids exception and no changes are made on the external ids. [externalId "gerrit:johndoe"] accountId = 1000000 [externalId "gerrit:JohnDoe"] accountId = 1000001 The LocalUsernamesToLowerCase execution fails with a duplicated ids exception and no changes are made on the external ids. Bug: Issue 14645 Change-Id: I9832fbf0c8df947aab5494325169b9c726e40019
* | | Update jgit to 73f8acdc5c97e068143c86765995c4fb6923ee91Antonio Barone2021-06-101-0/+0
| | | | | | | | | | | | Change-Id: Icb9ff0bbc8b8ca1e1402c59d76920da4b9edbcd8
* | | Bazel: Extend workspace status command to stamp jgit artifactDavid Ostrovsky2021-06-091-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | Also-by: Christian Aistleitner <christian@quelltextlich.at> Cherry-Picks: Ibe74e6de4ac0819c67dbd3ebb7008c3a716f3e06 Bug: Issue 14646 Change-Id: Ic49bfe5a5919474aba8859f3a843e5a39c6a2794
* | | Merge branch 'stable-3.1' into stable-3.2David Ostrovsky2021-06-082-7/+20
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | * stable-3.1: Add a test for case insensitive repo search Fix regression - enable insensitive search for repo search Change-Id: Icfa4ae561869709591fc74255a1478a457301b5d
| * | Add a test for case insensitive repo searchBen Rohlfs2021-06-081-6/+17
| | | | | | | | | | | | | | | Bug: Issue 14639 Change-Id: I9332c9a665144c0956e2d5e5675313aebef352f1
| * | Fix regression - enable insensitive search for repo searchMilutin Kristofic2021-06-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Regressed by 299682: Apply a second filter after receiving the initial repo list Bug: Issue 14639 Change-Id: Id026e964bb6849c9e551099fbbd870a3aebb5c57 (cherry picked from commit c098bf43ffdb74d0b95c020e062659f87a1e56f9)
* | | Merge "Merge branch 'stable-3.1' into stable-3.2" into stable-3.2Nasser Grainawi2021-05-272-2/+10
|\ \ \
| * | | Merge branch 'stable-3.1' into stable-3.2Prudhvi Akhil Alahari2021-05-272-2/+10
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.1: Fix to not throw NPE while accessing draft refs EqualsLabelPredicate: Fix bug that prevents matching owner votes Change-Id: If8b1d38adf900f1fc793c440bf30e50125e4e1a7
| | * | Merge branch 'stable-3.0' into stable-3.1Prudhvi Akhil Alahari2021-05-272-2/+10
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.0: Fix to not throw NPE while accessing draft refs EqualsLabelPredicate: Fix bug that prevents matching owner votes Change-Id: I41bb22fa6d739fa2719b24d4e6f13a5099ae6567
| | | * \ Merge branch 'stable-2.16' into stable-3.0Prudhvi Akhil Alahari2021-05-272-2/+10
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-2.16: Fix to not throw NPE while accessing draft refs EqualsLabelPredicate: Fix bug that prevents matching owner votes Change-Id: Ic9ff1d1b7b2829fa95b2a05963ee4e7fd1660f6a
| | | | * \ Merge branch 'stable-2.15' into stable-2.16Prudhvi Akhil Alahari2021-05-272-3/+11
| | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-2.15: Fix to not throw NPE while accessing draft refs EqualsLabelPredicate: Fix bug that prevents matching owner votes Change-Id: Ieba3fc1cb0ead80a54c3ec55ba6e7f0f574405dc
| | | | | * \ Merge branch 'stable-2.14' into stable-2.15Prudhvi Akhil Alahari2021-05-262-3/+11
| | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-2.14: Fix to not throw NPE while accessing draft refs EqualsLabelPredicate: Fix bug that prevents matching owner votes Change-Id: Id8905689376f8f169dbe11bf73137ab3dcbe4456
| | | | | | * | Fix to not throw NPE while accessing draft refsPrudhvi Akhil Alahari2021-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug was introduced by I622dbbb334b5a, where notes variable was being accessed without checking for null. Change-Id: I192b0fb8643eb2980998d56e088aa95f16d4b7c2
| | | | | | * | EqualsLabelPredicate: Fix bug that prevents matching owner votesPrudhvi Akhil Alahari2021-05-241-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug was introduced by I56ff6b1416f0 and it was forgotten to adapt the #match function of the LabelsPredicate. Change-Id: Ia420180eb73fe6aa535ddb8ec39fa981f5f67ddc
| | | * | | | | Merge changes If5e4876e,I37e57397 into stable-3.0Saša Živkov2021-03-123-20/+12
| | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: RepositorySizeQuotaIT: change try/catch to assertThrows Enforce repository size on pack rather than on object
* | | | \ \ \ \ \ Merge "Fix empty Registered field on settings screen" into stable-3.2Przemyslaw Waliszewski2021-05-272-0/+6
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | |
| * | | | | | | | Fix empty Registered field on settings screenPrzemyslaw Waliszewski2021-05-262-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Registered field is stored in account object. Account object is stored in cache and it is set with first restApi invocation. During the login process, not all account fields are set but cache entry is set. This cache needs to be updated when settings screen is open. Bug: Issue 14600 Change-Id: I4cc1233868c9fafa1035983be14be1b304a348ee