summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
* | Merge "ReceiveCommits: Remove declaration of unthrown exception" into ↵Edwin Kempin2016-01-221-2/+1
|\| | | | | | | stable-2.11
| * ReceiveCommits: Remove declaration of unthrown exceptionDavid Pursehouse2016-01-201-2/+1
| | | | | | | | Change-Id: I3492be14103f31ef75e02aa2f78d5a247c78d7bf
* | Merge "Return case-preserving email when suggesting reviewers" into stable-2.11David Pursehouse2016-01-212-2/+6
|\ \
| * | Return case-preserving email when suggesting reviewersSaša Živkov2016-01-192-2/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While Ie82c014e0 introduced case-insensitive by email search for reviewers, it also introduced a bug by returning the lower-cased email to the client. In case when an email for an account contained upper-case letter(s), this account couldn't be added as a reviewer by selecting it from the suggested list of accounts because its email (as received from the suggest reviewers REST call) was lowercased and Gerrit couldn't find such an account when adding the reviewer. The Ie82c014e0 already stored both original and lowercased email fields in the index, it just did it in a wrong order. Lucene's Document.get(fieldName) returns the first value of the field when there are multiple values. To fix the issue swap to order of the lower-cased and original-case values for the EMAIL field in the index. Change-Id: I4d9025810252641028288d961a1f9e62dd7b8e3e
* | Remove documentation of --type option from ls-groups commandDavid Pursehouse2016-01-211-10/+0
| | | | | | | | | | | | | | | | The --type option was removed in Change Ia67add4630 which was included in Gerrit version 2.9. Bug: Issue 3830 Change-Id: Iac6e46bd983acf111aa515738057dd372feb705b
* | Update replication plugin to latest versionHector Oswaldo Caballero2016-01-191-0/+0
|/ | | | | | - Replicate HEAD reference when replicating a project Change-Id: Ia18a416dc5ea29c08523148373476354ed7f0a24
* Update replication plugin to latest revisionDavid Pursehouse2016-01-131-0/+0
| | | | | | | - Revert "Remove obsolete remote.NAME.timeout from config documentation" - Add logging of cancelled replication events Change-Id: I5a90cdc11088a38a4957c0fecceb3827e078cc0c
* Use merge strategy for mergeability testing on "Rebase if Necessary" strategyOrgad Shaneh2016-01-131-2/+4
| | | | | | | | | | | | | | | | | | When a user pushes a chain of commits, they typically have inner dependencies, and it is likely that a commit in the middle of the chain cannot be merged by cherry-picking it alone, but if the chain is submitted in order it will be merged just fine. Applying cherry-pick for mergeability test fails for all the commits that cannot be picked without their dependencies, but this is obviously wrong when using "Rebase if Necessary", since the changes are never applied without their dependencies. With gerrit 2.12 this is even worse, since the Submit button is disabled for all the changes that are wrongfully marked as conflicted. Bug: Issue 3742 Change-Id: I6dd4d53e663bc9960c4c64b05cd011b87edcdabb
* OutputStreamQuery: Properly initialize c.patchSetsSebastian Schuberth2016-01-111-0/+1
| | | | | Bug: Issue 3762 Change-Id: I45eed63adddcdf124aabf3c2d71f4888501dea9d
* OutputStreamQuery: Minor indentation fixSebastian Schuberth2016-01-111-2/+2
| | | | Change-Id: I4f0265a97158671c616976067c09e9d0efc4ca29
* Improve documentation on commentlink.match regular expressionMatthew Webber2016-01-081-0/+5
| | | | | Bug: Issue 412 Change-Id: I2e7a7e0cc3d971d5f157be7e2f8899644d53c9de
* Fix handling of lowercase HTTP usernameLuca Milanesio2016-01-071-1/+5
| | | | | | | | | | | | | | When Gerrit config auth.userNameToLowerCase is set to true we need to convert the HTTP-provided username to lowercase as it is done on all the other authentication mechanism. Problem has been reported on version 2.12 but it seemed to be in the codebase since the beginning (see [1]). [1] https://groups.google.com/forum/#!topic/repo-discuss/spxE88RiDfo Change-Id: If4398bc959ee10e631149e96db05d272634d62ce Reported-By: Steffen Gebert <steffen@steffen-gebert.de>
* Remove warning about unstable change edit REST API endpointsDavid Pursehouse2015-12-181-3/+0
| | | | | | Since 2.11 these endpoints should be considered stable. Change-Id: I4023f5054a930f17982548bfb34bc20b3b703b70
* Document that ldap.groupBase and ldap.accountBase are repeatableDavid Pursehouse2015-12-161-0/+6
| | | | | | | | | | | | | | Both of these options can be given multiple times in the config file, for example: [ldap] accountBase = OU=Europe,DC=example,DC=net accountBase = OU=America,DC=example,DC=net accountBase = OU=Asia,DC=example,DC=net Extend the documentation to mention this. Change-Id: Iba684adc1beea145a7fdd1d1d71ca6c81bbda8a7
* Merge "OAuth-Linking: Don't create new account when claimed identity ↵David Pursehouse2015-12-161-6/+22
|\ | | | | | | unknown" into stable-2.11