summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Set version to 2.11.9v2.11.9David Pursehouse2016-05-168-8/+8
| | | | Change-Id: Ie7d3ea7819f5016b1721980f3cdee1d683f08f48
* Release notes for Gerrit 2.11.9David Pursehouse2016-05-162-0/+52
| | | | Change-Id: I8125c68bd9716eb782e392be6362dd98ad8649ed
* Fix duplicate links in documentZhen Chen2016-05-121-1/+1
| | | | | | | Two sections have the same link [[get-content]]. When click from the toc, all will direct to the first section. Change-Id: Iefaeab5887c5121f9bdbc7a00413bfded3d66021
* ProjectConfig: Use conditional-and (&&) instead of bitwise-and (&)Edwin Kempin2016-05-121-1/+1
| | | | | Change-Id: I8c8bf7aa9bee45b559c585fcc63c2f265037bbe8 Signed-off-by: Edwin Kempin <ekempin@google.com>
* Merge "Fix "Failed to reindex changes"" into stable-2.11David Pursehouse2016-05-011-1/+4
|\
| * Fix "Failed to reindex changes"Alexandre Philbert2016-04-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since ReindexAfterUpdate starts tasks asynchronously, it is possible for a change that was once in the list of changes to get reindexed to no longer exist. This could happen if a draft change existed at the moment GetChanges was called and got deleted before db.get(id) is called. In this case, it returns null and ChangeDataFactory tries to create a ChangeData with a null Change which causes a ProvisionException. This fix simply checks if the returned value is null and doesn't try to reindex the change since it doesn't exist anymore. Change-Id: I15dc1bde132a826a7ce1c7afef9242a7537ab894
* | Fix NPE in HttpAuthFilter.getRemoteUser()Doug Kelly2016-05-011-1/+2
|/ | | | | | | | | | HttpAuthFilter.getRemoteUser() was updated to honor the userNameToLowerCase setting with the change in If4398bc9. However, remoteUser as returned by RemoteUserUtil.getRemoteUser() can be null, so we should additionally guard against null values before performing the toLowerCase() conversion. Change-Id: I0f3265976824231b9e15fc55dd35d012db4f33bb
* OutputStreamQuery: Only return current patch set when visible to userDavid Pursehouse2016-04-225-15/+68
| | | | | | | | | | | | | | | | | | | | When querying changes with the 'gerrit query' ssh command, and passing the --current-patch-set option, the current patch set is included even when it is not visible to the caller (for example when the patch set is a draft, and the caller cannot see drafts). This causes problems for example when the caller runs a query and then tries to perform some operation on the revisions of the current patchset revisions that were returned. For those revisions that are not visible, the operation will fail. The same is true when using the --patch-sets option. Add a check for patch set visibility, and do not add it in the results. Bug: Issue 4070 Change-Id: Id68969bc49a9412ae81f252fd2d846539d9022fa
* Fix NPE in SubmitRuleEvaluatorYuxuan 'fishy' Wang2016-04-211-0/+3
| | | | | | | Throw OrmException when we cannot get any patch set in SubmitRuleEvaluator#initPatchSet, so we won't get NPE in callers. Change-Id: I630aa2cc905c09187433cc45c19f5c61a171b977
* Protect the TrackingFooters.extract from null input parameterSaša Živkov2016-04-191-0/+4
| | | | | | | | | | | | | Some code paths could pass null to the TrackingFooters.extract. An example is [1] which happens when loading of the current patch set of a change fails. [1] at com.google.gerrit.server.config.TrackingFooters.extract(TrackingFooters.java:42) at com.google.gerrit.server.query.change.OutputStreamQuery.query(OutputStreamQuery.java:247) ... Change-Id: I27ce4cc0d9606208a8be884646e901004171bd96
* Fix index-activate and index-start documentationHugo Arès2016-04-192-2/+2
| | | | | | | Remove usage of @SSH_PORT@ and @SSH_HOST@ macros. These macros are working for plugins but not for core documentation. Change-Id: I3b5a2f7096dda38090a3ae362ae8da75e3e03573
* Fix subject for "Updated Changes" lines on pushEdwin Kempin2016-04-141-4/+6
| | | | | | | | | | When a change was updated it showed the subject from the previous patch set and not as expected the subject from the new current patch set. Bug: Issue 4055 Change-Id: I33d1912cccea795fc003a07bc88800c536c301da Signed-off-by: Edwin Kempin <ekempin@google.com>
* Update URLs for bouncycastleEdwin Kempin2016-04-131-2/+2
| | | | | | | | | | The bouncycastle libs are now available on Maven Central [1]. [1] https://www.bouncycastle.org/latest_releases.html Bug: Issue 4056 Change-Id: Ib99ee29f5c9572b06d3ee3200123ff751c2f924b Signed-off-by: Edwin Kempin <ekempin@google.com>
* Fix keyboard shortcuts for special processing of CTRL and METAPascal Krause2016-03-241-0/+6
| | | | | | | | | The processing of CTRL and META was in change I8e7d552b3927047b31ced373eafac3436a70b277 unnecessarily removed. As a result of this shortcuts like 'STRG+T were' interpreted as 'T'. Bug: issue 3970 Change-Id: If782ca367a9c7f34db3b53fd1f2974f7a9127dfc
* InitPlugins: Fix incorrect indentationDavid Pursehouse2016-03-141-1/+1
| | | | Change-Id: If2d45265041fa68f287aff0e2f4f615e737635fe
* Update 2.11.8 release notesv2.11.8David Pursehouse2016-03-091-0/+2
| | | | Change-Id: I02dd628a4579e532371c4b671b5195ef2ec2a6ee
* Merge "Prevent NPE in the SshLog" into stable-2.11David Pursehouse2016-03-091-0/+6
|\
| * Prevent NPE in the SshLogDariusz Luksza2016-03-081-0/+6
| | | | | | | | | | | | | | | | | | | | This NPE can happen when command was destroyed (probably by user canceling the ssh operation) using CommandFactoryProvider.onDestroy before it was even logged. In this case we provide meaningful audit entry instead of not-so-nice NPE with stack trace in the logs. Change-Id: If15a9475a4d98ade9a263b4ed4dcf5a1dd694731 Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
* | Merge "Fix keyboard shortcuts for non-US keyboards" into stable-2.11David Pursehouse2016-03-082-11/+2
|\ \
| * | Fix keyboard shortcuts for non-US keyboardsPascal Krause2016-03-082-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The forward/backward navigation keys "[" and "]" worked only on those keyboards where these characters could be typed without using any modifier key (like CTRL, ALT, etc..). For example, on German keyboard the "[" is entered as ALTGR+8. Webkit browsers translate the ALTGR modifier into CTRL+ALT (This seems not to be true in Linux. Because of this fact, this change doesn't have any effect on Linux). Further, our code in gwtexpui checks for CTRL and ALT keys and modifies the entered key accordingly. Therefore, the "[" typed on German keyboard gets modified to some other key. This change removes the special processing of CTRL and ALT key modifiers and makes the "[", "]" and likely a few other keys work on German (and likely other) keyboard. A further issue with the "[" and "]" keys is when the focus is inside codemirror. CM detects the keys correctly, but when CM lookup for a key handler in the keymap it wrap the key into two "'". Because of this CM looks for a key with the value "'['" or "']'". But in SideBySide.java the keys were defined as "[" and "]". So CM couldn't find the defined key handler and used other CM native handlers for these keys. Bug: issue 1207 Change-Id: I8e7d552b3927047b31ced373eafac3436a70b277
* | | Merge changes Icf972799,I6bb96382 into stable-2.11David Pursehouse2016-03-0810-8/+50
|\ \ \ | |_|/ |/| | | | | | | | | | | * changes: Set version to 2.11.8 Release notes for Gerrit 2.11.8
| * | Set version to 2.11.8David Pursehouse2016-03-088-8/+8
| | | | | | | | | | | | Change-Id: Icf972799193c5d2a4a24ea800be7099395af799f
| * | Release notes for Gerrit 2.11.8David Pursehouse2016-03-082-0/+42
| |/ | | | | | | Change-Id: I6bb9638211cc115513213acd38c164157e9c18fb
* | Clear the input box after cancelling add reviewer actionDavid Pursehouse2016-03-081-0/+1
| | | | | | | | Change-Id: I7db478f6a88de1cd8581437399b31e8f4fcd21db
* | ReviewCommand: Don't add message twice on abandon or restoreDavid Pursehouse2016-03-082-10/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When abandoning or restoring a change via the --abandon or --restore option, and giving a message with the --message option, the message was being added twice. Once by the 'review' and once by the abandon or restore. This was already fixed once in change I9c7e81599 which was included in Gerrit version 2.6, but was then re-introduced by I2240759ba which was included in version 2.9. Fix it, and add an acceptance test to make sure it doesn't get broken again. Change-Id: I92f8fd98d75c2b1dd96c91f404be3943109c3519
* | Update commons-collections to 3.2.2Shawn Pearce2016-03-081-2/+2
|/ | | | | Change-Id: I59a2d2874dd410df1715a70b011f879a9d9480e3 (cherry picked from commit bd6143c4db26626ba7570c77d2561cd1aab35a2c)
* SetParent: Explicitly set to All-Projects when not specifiedDavid Pursehouse2016-02-182-7/+24
| | | | Change-Id: I694b7d6099fc65706ca6e07d8ea2870c900e8f87
* CreateProject: Explicitly set parent to All-Projects when not specifiedDavid Pursehouse2016-02-171-5/+11
| | | | | | | | | | | | | | When the parent is not specified, and the project's other settings are all default, no project.config file is created on refs/meta/config. This prevents metadata updates from working as expected when they result in a file being removed. Explicitly set the parent to All-Projects when not specified, so that a project.config file gets created on refs/meta/config. Bug: Issue 3919 Change-Id: I4c0a11253413ff0b6a75e87429949be90a15aa95
* Set version to 2.11.7v2.11.7David Pursehouse2016-02-108-8/+8
| | | | Change-Id: I1254abbba305f763d74045d68245aa997a7af155
* Release notes for Gerrit 2.11.7David Pursehouse2016-02-102-0/+45
| | | | Change-Id: I5cd45f5b7fa0110c593b6baca5755cd00d6a17cf
* Document new allowrcpt restriction on adding user emailDavid Pursehouse2016-02-101-0/+3
| | | | | | | | | Since change Ic83e1f739 the new email address must belong to a domain that is allowed by the sendemail.allowrcpt setting. Update the documentation to mention this. Change-Id: Ib818535b0fa30dd25fde2d92837bfa913cb71f9e
* OutputStreamQuery: fix comments with current-patch-set optionHugo Arès2016-02-102-0/+29
| | | | | | | Comments were added at the change level but were not added at the patch set level when using with current-patch-set option. Change-Id: I85336d67ad9aafe972ecfd86f95175093d4449cd
* Add tests for ssh query commandHugo Arès2016-02-101-0/+295
| | | | | | | | | | | | | | | | | Add tests for almost all ssh query command options. The only combination of options not covered is --comments with --current-patch-set. The test for that combination proved that there is a bug in the current code. A follow up commit will add the test and the code fix. Writing these tests exposed the complexity of OutputStreamQuery class. It also exposed that many options of OutputStreamQuery are not exercised since the only usage of it is in the ssh query command and the latter is not using all the options. Simplification of OutputStreamQuery class will be done in follow up commits. Change-Id: Iec30b1589bbe3dff840c75749f4929305f2632a1
* EmailReviewComments: Provide the current user instead of exceptionDavid Pursehouse2016-02-092-10/+9
| | | | | | | | | | | | | | | | | | | | | | The review comments are sent in a separate thread, and when invoked by a context that needs the current user it fails because getCurrentUser() raises OutOfScopeException. Modify EmailReciewComments sender and its Factory.create() to accept an IdentifiedUser rather than an Account.Id, and use it to return from the getCurrentUser() method instead of throwing an exception. Test plan: - Create a group named "test-group", visible to all users. - Create a project named "test-project". - As "user-a", add a project watch on "test-project" with the search query "label:Code-Review=+1,group=test-group". - As "user-b", add a Code-Review+1 score on a change on the "test-project" project. Bug: Issue 3882 Change-Id: Iebcded01d7f72156f2b292d7b55848efc6e03dc2
* OutputStreamQuery: Take files into account when adding patch setsSebastian Schuberth2016-02-061-1/+3
| | | | | | | | | The original fix for issue 3762 did not consider whether files should be included in the patch set or not. Fix this by using the overload of addPatchSets() which takes the includeFiles argument. Bug: Issue 3877 Change-Id: Ie594b93d65bae6cdc353ba22ac1f2d558689a76a
* Update 2.11.6 release notesDavid Pursehouse2016-02-041-0/+4
| | | | | | Add a fix that was missed. Change-Id: I97a7a3c5de056ea96cc5855488a4cd9cd5f0cc45
* OutgoingEmail: Fix breakage introduced in add() methodDavid Pursehouse2016-02-041-1/+1
| | | | | | | | | | | | | In change Id79e13f5a the add method was refactored to check for valid emails. During this refactoring one statement was missed. It was not caught on this branch because there is no acceptance test, and manual tests were only done for the negative case (ivalid address, address prohibited). The problem was caught when merging up to stable-2.12, where there is an accepance test for mail messages. Change-Id: Ie437f5d733c5a9d1015f0322c6e04055a73eb9b5
* ReceiveCommits: Improve error message when failing to insert patch setDavid Pursehouse2016-02-031-7/+2
| | | | | | | | | The handling of IOException and InsertException is the same, so combine the two blocks into a single catch. Make the error message a bit more readable. Change-Id: Ia1cdf4a3ed518f9bfbbe46bd72aa51593be3f2db
* OutgoingEmail: Kill "Skipping delivery of email" logspamDavid Pursehouse2016-02-031-2/+0
| | | | | | | | | | | The logs: INFO: "Skipping delivery of email with no recipients" and WARN: "Skipping delivery of email with no body" don't add any value, and just fill up the logs. Remove them. Change-Id: I66d19f8bd970bb9403849c4fa7bfb7f7f597b46d
* OutgoingEmail: Check for valid email address when adding recipientsDavid Pursehouse2016-02-031-14/+15
| | | | | | | | | | | | | | | | | | | | After finding error logs filled with the message: Not emailing NULL (prohibited by allowrcpt) it turned out that a user's preferred email address had been set to the literal string "NULL". Presumably this was done while running a version of Gerrit older than 2.9, which included change I1f8d95dd9 ("Validate email address when adding email or creating account"). In combination with the allowrcpt setting being enabled, this was preventing the user from receiving any mails from Gerrit, and causing the log to be filled with this message. When adding recipients to an outgoing mail, check for the email address being invalid, and log a different message in this case. Change-Id: Id79e13f5afb1a640b5afed21a9fb50b7fc8aa5f0
* ldap.Helper: Kill "assuming empty group membership" logspamDavid Pursehouse2016-02-031-4/+0
| | | | | | | | | | | | Change I75fd86fb9 added catching of AccountException and replaced the stack trace log with a warning: "Account <name> not found: assuming empty group membership" The intention was to prevent excessive logging, but these warnings themselves are filling up the log. Change-Id: Id52830dbcab1f7434960a47cb11e5e559a6f650a
* SmtpEmailSender: Refactor open method and improve loggingDavid Pursehouse2016-02-031-19/+15
| | | | | | | | | | | | - Log the reply code and reply string when the connection is rejected by the SMTP server. - Reuse the reply string in subsequent error handling clauses. - Combine handling of IOException and EmailException into a single catch block to reduce duplicated code for disconnecting the client. Change-Id: Icf36e8bf10e2273ff6678734f9f0759a52505f24
* CreateEmail: Don't allow to add email prohibited by sendemail.allowrcptDavid Pursehouse2016-02-032-1/+9
| | | | | | | | | | | | | If the server configuration includes sendemail.allowrcpt, and the user attempts to add an email address whose domain is not included, return a "method not allowed" error. This check is not done when the calling user has the 'ModifyAccount' capability and has set the noConfirmation flag on the request. In this case the email is added without any validation other than that the email address itself is a valid email address. Change-Id: Ic83e1f73962dbc4ba76c6ab2c518797fa9d6adeb
* RegisterNewEmailSender: Don't unconditionally send verification mailDavid Pursehouse2016-02-031-5/+0
| | | | | | | | | | | | | | | | | | | | | If the server configuration includes sendemail.allowrcpt, and the user attempts to register an email address that is not included in the allowed list, OutgoingEmail will skip adding that address to the list of recipients. However, RegisterNewEmailSender overrides the 'shouldSendMessage' method to always return true, which means Gerrit still attempts to send the verification mail which has no recipients. This results in an error from the SMTP server: rejected DATA command: 503 5.5.2 Need rcpt command which in turn results in an "Internal server error" message to the user. Remove the overridden shouldSendMessage method, so that the default implementation (which checks for recipients and content) is used. Change-Id: I4f756f98627447a3f23ecdc9fa82309ba0a0271a
* Set version to 2.11.6v2.11.6David Pursehouse2016-02-028-8/+8
| | | | Change-Id: I88880291a338b210700bcbadd9c968ffe62dfff7
* Release notes for Gerrit 2.11.6David Pursehouse2016-02-022-0/+127
| | | | Change-Id: Id6bc60d895c8a1f6079edc1cd786ad347381daf5
* Update replication plugin to latest revisionDavid Pursehouse2016-01-291-0/+0
| | | | | | | - Revert "Replicate HEAD reference when replicating a project" - Fetch parent groups of the authGroups Change-Id: I0fab5d828fef06b583404f30cacf17f44c882da0
* Expose IndexCollection in plugin guice injectorDavid Ostrovsky2016-01-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Secondary index underwent quite some evolution, by adding new fields or turning search predicates that (uncorrectly) used database to produce matches to use secondary index. When new index version is added, the previous index version must still be supported because of online reindexing feature. On very big site, reindexing may take hours, clearly such a long offline time is non acceptable, that why online reindexing feature was invented. To make online reindexing work, schema version must be fetched to route the current search predicate to use old (legacy) or new field. For that IndexCollection is accessed and the current schema version is read. Unfortunately, IndexCollection implements LifecycleListener and these classes are not copied in guice plugin injector when the plugin is loaded. This makes secondary index machinery not usable from within a plugin listener. For the reasons explained above some search predicates would try to retrieve the secondary index version but because singleton IndexCollection instance wasn't made available in plugin's guice injector, the correct instance is not found and guice injector creates new virgin IndexCollection instance where change index (and the schema version) is not set. As the consequence we are getting a NPE when secondary index is tried to be used from within plugin listener. To rectify, expose IndexCollection to plugin guice injector. Bug: Issue 3768 Change-Id: I2f9c40aa43aa7b1b954d8fa318df54e45dffcd95
* Merge "ReceiveCommits: Log error message when failing to insert patch set" ↵Edwin Kempin2016-01-221-0/+3
|\ | | | | | | into stable-2.11
| * ReceiveCommits: Log error message when failing to insert patch setDavid Pursehouse2016-01-201-0/+3
| | | | | | | | Change-Id: I15f4b6523368fe448d47253b8e908138d6692ccd