summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* AccountSshKey: Strip newline characters out of public key stringv2.13.3David Pursehouse2016-11-242-1/+17
| | | | | | | | | | | | | When an ssh public key is migrated from the database to the git backend, it is stored in the authorized_keys file in the user's ref in All-Users. If the public key has newlines, each line is read back as a separate key, each of which will be considered invalid. Strip newlines out of the public key string to prevent this situation. Bug: Issue 4643 Change-Id: If3971fc1c432c79364206b2f3633db1629267ba0
* Merge branch 'stable-2.12' into stable-2.13David Pursehouse2016-11-241-1/+2
|\ | | | | | | | | | | | | * stable-2.12: Fix comparison using reference equality instead of value equality Change-Id: Ib9e77ff49f8741dc3765ad7930c1e3d077448ce2
| * Fix comparison using reference equality instead of value equalityAndrew Bonventre2016-11-231-1/+2
| | | | | | | | Change-Id: I635573a20bdaabf07f4aac2f9eda4f943764ee02
* | Merge branch 'stable-2.12' into stable-2.13David Pursehouse2016-11-220-0/+0
|\| | | | | | | | | | | | | * stable-2.12: Set version to 2.12.7 Change-Id: If5e4a10bf64d48750b38caae51dd0049782e6b29
| * Set version to 2.12.7v2.12.7David Pursehouse2016-11-2210-10/+10
| | | | | | | | Change-Id: I7a483a1f62237e494be5bb09668678abded8a7cb
* | Doc: Update avatar plugin linksOrgad Shaneh2016-11-201-6/+6
| | | | | | | | Change-Id: I07d484d65d613c86a228efad4cf8687560b84020
* | Revert "ListPlugins: Remove deprecated --format option"David Pursehouse2016-11-181-13/+34
| | | | | | | | | | | | | | | | | | | | | | | | Removing the --format option from the REST API had the side effect of also removing it from the 'plugin ls' ssh command. Removing the option from the 'plugin ls' is a breaking change for some users, so put it back. This reverts commit 3bbd3c313fc0fbfcf364b4697e75cae6674230df. Change-Id: I2f4af48f16273f4875b28349e5afd707f2103bec
* | Merge "Set version to 2.13.3" into stable-2.13ekempin2016-11-1810-10/+10
|\ \
| * | Set version to 2.13.3David Pursehouse2016-11-1510-10/+10
| | | | | | | | | | | | Change-Id: Ief9003913f7af82a849dab81fdd0b19c7b13c0e7
* | | Merge "Fix NPE when requesting invalid Change-Id to index" into stable-2.13ekempin2016-11-171-2/+10
|\ \ \
| * | | Fix NPE when requesting invalid Change-Id to indexLuca Milanesio2016-11-141-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an invalid Change-Id containing a comma ',' is provided to the SSH gerrit index changes command, it does not blow up and instead returns an "Invalid change ID" error and exit code 2. Change-Id: I97e888e372eb886b9ac9815791a7a725802d736f Bug: Issue 4911
* | | | Merge branch 'stable-2.12' into stable-2.13David Pursehouse2016-11-164-9/+58
|\ \ \ \ | |_|/ / |/| | / | | |/ | |/| | | | | | | | | | * stable-2.12: Allow submit of merge of non change branch Avoid unnecessary group visibility checks Change-Id: I4023e77585228bf3c8c5d1a0dc165fb80f8e1d16
| * | Allow submit of merge of non change branchSven Selberg2016-11-163-3/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a61b6eed5337049a7feb58ac935543624f107129 introduced a bug that prevents mergeing of a branch that is not a change. It marks the branch to be merged into as uninteresting whereas the branch that gets merged is not, which causes Gerrit to think that it is not allowed to merge it resulting in MISSING_DEPENDENCIES error. In the case where the walk hits a commit that does not have canMergeFlag and is not in the commits to be submitted, check if commit is already merged. Bug: Issue 4930 Change-Id: Ib4f95ebe336e381d6fcbf36867e84d927ac13eb1
| * | Avoid unnecessary group visibility checksSaša Živkov2016-11-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The list-groups REST API call checked group visibility even for those groups which are filtered out. In a system with 10-20K of groups this can cause 30-60 seconds delay when checking if current user can see a group. Avoid unnecessary group visibility checks by moving it towards the end of the loop. Therefore, group visibility is only checked for those groups which are not filtered out. Change-Id: Id5984049d0103fbbf656b704f672f01283844b64
* | | Merge branch 'stable-2.12' into stable-2.13David Pursehouse2016-11-146-14/+173
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-2.12: Fix broken submit tests Add @Sandboxed annotation for classes and methods Add tests for submit whole topic on multiple projects/branches Update download-commands plugin It seems no longer necessary to run the submit tests sandboxed, so remove that annotation. Change-Id: I442ed6efc045bff51259b8d08915b8a1cc1e2eb0
| * | Fix broken submit testsDavid Pursehouse2016-11-141-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test for submitting whole topic on multiple branches was broken in several ways: - It was resetting the "dev" branch using the initial head of the default test project, rather than that of the specifically created project. - The base revision of the created "dev" branch was not specified, so it was not clear where it was being created from. - The call to the API to create the "dev" branch was done without using the properly namespaced project name. Fix all of these problems. Also, when running the whole suite of tests under Java 7 some of them failed, while the same tests passed when running individually. The root cause of this is not yet known, but it would seem that the tests are somehow interfering with each other. Annotate the AbstractSubmit class with @Sandboxed so that each test is run on a separate server instance. This makes the tests somewhat slower, but makes sure they don't interfere with each other any more. Change-Id: I2728106fce71d239b09572928b0f7489b96cdc64
| * | Add @Sandboxed annotation for classes and methodsPatrick Hiesel2016-11-144-3/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are some tests where it is especially hard to make sure that they are not influenced by other tests in the same class. This includes all indexer tests since some of them check the cardinality of a query result, which might change as more entities are added by other tests. This is a backport of the original change, adapted to work on stable-2.12. Change-Id: I74b40b2e7f95894dd666dcd87d97fd29b2d67c51
| * | Add tests for submit whole topic on multiple projects/branchesDavid Pursehouse2016-11-132-7/+105
| | | | | | | | | | | | Change-Id: I9ac7b5c7743e7c931859900ce4333ffe6914cd4b
| * | Update download-commands pluginDavid Pursehouse2016-11-131-0/+0
| | | | | | | | | | | | | | | | | | - CloneWithCommitMsgHook: Fix HTTP clone command inconsistency Change-Id: I429c2d31d16491acf63d663a3c0420aebe792b63
* | | Fix notes NPE for has:draft search predicate.Martin Fick2016-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | Use notes() instead of accessing the notes field directly since it can be null. Calling notes() ensures that it is not null. Change-Id: Ie7e49cdf38b929e637f650b2cf1f6a2db9b68890
* | | Update git submodulesDavid Pursehouse2016-11-131-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update plugins/download-commands from branch 'stable-2.13' - Merge branch 'stable-2.12' into stable-2.13 * stable-2.12: CloneWithCommitMsgHook: Fix HTTP clone command inconsistency Change-Id: I8a86b8cc56834933391afd56fc93d4ece67a4401 - CloneWithCommitMsgHook: Fix HTTP clone command inconsistency When cloning a project using HTTP schema, the "/a" in the URL was added only when choosing to clone without the commit hook. Now the URL is the same in both cases. Change-Id: I8fc0667f17cea592bd702a0441cba7ca3f762968 (cherry picked from commit d632d6471b42a47877664a5266ba509026538a32)
* | | ProjectWatchIT: Test that watches of different users don't interfereEdwin Kempin2016-11-101-9/+25
| | | | | | | | | | | | | | | Change-Id: I4d2364193118893c075679f40d509f799f177915 Signed-off-by: Edwin Kempin <ekempin@google.com>
* | | Test that watches for other projects are not appliedEdwin Kempin2016-11-101-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Project watches of other projects could wrongly lead to email notifications when the user had a non-matching watch for the project to which the change was uploaded. E.g. when a user watched project A with filter 'file:a.txt' and project B with filter '*' then the user was notified for a change on project A that didn't include a file 'a.txt'. This was because the filter for the second unrelated project watch was found matching. This was fixed by change I07ef60, but this change didn't add a test for this case. Change-Id: If1720ef145079e8a900afe11fa5ff85671626a31 Signed-off-by: Edwin Kempin <ekempin@google.com>
* | | ProjectWatchIT#watchFile(): Use watchedRepo for both changesEdwin Kempin2016-11-101-1/+1
| |/ |/| | | | | | | | | | | | | Otherwise the test doesn't correctly verify that the filter on the project watch works. Change-Id: I628ee4869b9d13eeab9fa0454c79f04a6e35671d Signed-off-by: Edwin Kempin <ekempin@google.com>
* | Merge "Strip servlet API from GWT jar to avoid classpath collision" into ↵David Pursehouse2016-11-101-0/+1
|\ \ | | | | | | | | | stable-2.13
| * | Strip servlet API from GWT jar to avoid classpath collisionDavid Ostrovsky2016-11-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gwt-user.jar is packaging javax.servlet stuff in older version that our own servlet_api_3_1. In case plugins depend on the new API they get compilation failures that hard to track down und understand. We are already stripping outdated Jetty stuff from gwt-dev.jar artifact so that we don't mind to do it also for gwt-user.jar. The good news are in GWT 2.8 the most dependencies were externalized. Reported-by: David Pursehouse <dpursehouse@collab.net> Change-Id: Ief44bc676fca9bcd2fb1e4f7dff4547d1604c5cd
* | | CommitBox: Remove unused parentWebLink elementsDavid Pursehouse2016-11-102-12/+0
|/ / | | | | | | | | | | Support for parent web links was removed in change I8508dcaf3. Change-Id: I85dce0d8c29ed6a887a41f274b415b1cedfaec18
* | Use recursive name lookup for PluginConfigLuca Milanesio2016-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | PluginConfig is based on Gerrit's Config and delegates its variable resolution to its base config object. When resolving the configuration names, we do need to perform a recursive resolution otherwise we would always get an empty names list. Change-Id: Iff7a0de4530597fbe45c7aef753363ab6132ecfa
* | BatchUpdate#newChangeContext: Add sanity check on unwrapped changeDavid Pursehouse2016-11-081-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | If the unwrapped change is null, this causes NPE later in the call stack. Check if the change is null, and if so log it and throw an exception. Also modify the method's throws declaration to explicitly list the exceptions that are thrown. Change-Id: I994b360daf74ef3a2edf7e6f1660aabe7005a122 Signed-off-by: David Pursehouse <dpursehouse@collab.net>
* | Merge branch 'stable-2.12' into stable-2.13David Pursehouse2016-11-085-19/+56
|\| | | | | | | | | | | | | | | | | | | | | | | * stable-2.12: Set version to 2.12.6 Fix formatting of Apache Derby database documentation CherryPick: Update mergeTip for every cherry-pick AbstractSubmit: Add more assertions in submitWholeTopic Notice merged commits even if they appear on a different branch MergeTip: Expose initial tip Change-Id: I3aff16da2febf3ee8b2aaccd6175a9c9295dcb12
| * Set version to 2.12.6v2.12.6David Pursehouse2016-11-0810-10/+10
| | | | | | | | Change-Id: If323e0dbf8a6e643611b6c6a7cd517a3884d8380
| * Fix formatting of Apache Derby database documentationDavid Pursehouse2016-11-081-6/+7
| | | | | | | | Change-Id: I1a54053bc124ed67631fe74553e70b62862000da
| * CherryPick: Update mergeTip for every cherry-pickSven Selberg2016-11-081-1/+1
| | | | | | | | | | | | | | | | | | When updating mergeTip in updateChanges mergeTip is not updated between cherry-picks so all commits in Batch will be done on tip of target branch, not stacked on each other. Bug: Issue 4887 Change-Id: I59ce9f60eba08e44dd1e9a8ac1a9c953ed066570
| * AbstractSubmit: Add more assertions in submitWholeTopicDavid Pursehouse2016-11-081-0/+22
| | | | | | | | | | | | | | | | Add an additional check that the remote log has the expected commits after the submit. Bug: Issue 4887 Change-Id: Ia39fd771d9e019f97670d6131022fcd3d8d2965d
| * Notice merged commits even if they appear on a different branchSven Selberg2016-11-088-19/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport for stable-2.12 of: Notice merged changes even if they appear on a different branch Idcaec3f0db9e67b8a8390ddd73c0aca95a654b0b Check for merge changes contains an optimization which is overeager: It assumes that all changes that are reachable from any branch are not part of the set of new changes being applied. This speeds up the walk to determine the set of changes to be examined, but produces an incorrect [too small] set. This results in "internal error: change is new" errors when trying to submit a change to one branch that is already part of another branch. For RebaseIfNecessary: Do not mark child of merge candidates as uninteresting If a merge candidate is parent of one of the already accepted refs, the merge candidate will disappear during the sorting in RebaseSorter#sort if it's child is marked as uninteresting. Only mark tip of target branch as uninteresting. Bug: Issue 4158 Inspired-by: Stefan Beller <sbeller@google.com> Change-Id: I483de5bdb2740bb1a7d3dcb71a15865574231647
| * MergeTip: Expose initial tipDave Borowitz2016-10-311-6/+16
| | | | | | | | Change-Id: I4ad0ad580dd0c55a32054b106549ab743e9b89be
* | AbstractSubmit: Add more assertions in submitWholeTopicDavid Pursehouse2016-11-081-6/+29
| | | | | | | | | | | | | | | | Add an additional check that the remote log has the expected commits after the submit. Bug: Issue 4887 Change-Id: Ia39fd771d9e019f97670d6131022fcd3d8d2965d
* | Timer0: Fix example given in JavaDocEdwin Kempin2016-11-071-1/+1
| | | | | | | | | | Change-Id: Ib29bc49526fd0abb37f0566da8e9ea45c2a9e5b3 Signed-off-by: Edwin Kempin <ekempin@google.com>
* | SetMembersCommand: Handle REST errors gracefullyDavid Pursehouse2016-11-041-19/+24
| | | | | | | | | | | | | | | | | | | | | | | | If a REST error occurs while adding a member or group to a group, the command fails with "internal server error" which is not helpful to the user. Catch REST errors and allow them to be reported back to the user. Other types of error will still result in "internal server error". Change-Id: Ia21f7aa28212f6d93ec4e6ff74a9de9ee6428a00
* | Remove unused importHugo Arès2016-11-031-1/+0
| | | | | | | | Change-Id: I5799cb58ec1cc2d01914a8633a3e6047fc6ff781
* | IncludedIn: Don't fail with NPE if ExternalIncludedIn returns nullEdwin Kempin2016-11-031-2/+5
| | | | | | | | | | | | Change-Id: I1daf70677e58dbde22ab65f081c5e3eb5d1fd401 Signed-off-by: Edwin Kempin <ekempin@google.com> (cherry picked from commit 6d5a2d3ed9122b477937150c5b2a985c7c2505f7)
* | Fix to reindex a change via SSH: get from DB/Notes instead of LuceneLuca Milanesio2016-11-022-3/+46
| | | | | | | | | | | | | | | | | | | | | | When reindexing a change via SSH, we need to avoid using the Lucene index to decode the change-id into a ChangeControl. The rationale stays in the typical use-case of the reindex itself: if we need to recreate the Lucene index entry we cannot rely on a Lucene query to find it. Change-Id: I34dbf535241a604089ddb5d3af570c4b97c5cc2e
* | Update git submodulesChristian Köstlin2016-11-021-0/+0
| | | | | | | | | | | | | | | | | | | | | | * Update plugins/hooks from branch 'stable-2.13' - Add project name to commit received hook This also implicates that GIT_DIR and the working directory is correctly set for the ref-update hook. Bug: Issue 4841 Change-Id: I48141d316cacdd649f6e56ea48d689d06940fbf5
* | Fix Postgresql JDBC driver leaking memoryHector Oswaldo Caballero2016-11-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Older versions of Postgresql JDBC driver rely on finalize() methods in order to avoid leaking unclosed database objects. Given finalize methods are unpredictable (no guarantee about prompt execution, if at all), in some high load environments this could lead to a memory leak with millions of JDBC objects pending finalization. Newer versions of the Postgresql JDBC driver removed the use of finalize methods to avoid this kind of issues. Bug: Issue 4848 Change-Id: Ia143f1df1d8e41686362fd76b9bc82e0046f9894
* | Merge "Fix Schema_127 for mysql on case-sensitive FS" into stable-2.13ekempin2016-10-281-7/+7
|\ \
| * | Fix Schema_127 for mysql on case-sensitive FSSaša Živkov2016-10-281-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql tables are case-sensitive when mysql runs on a case-sensitive file system (like linux). Schema_127 failed when upgrading Gerrit using mysql on linux because it couldn't find the ACCOUNT_PATCH_REVIEWS table in mysql. Use lowercase for the table name and also for column names. This is also compatible with the code in other Schema* classes. Change-Id: I13ba89a25c87790e74c43221c6573812876b1f70
* | | Update git submodulesDavid Pursehouse2016-10-281-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update plugins/hooks from branch 'stable-2.13' - Always return the output from ref-update hook Change I5905c44c7 moved the invocation of the ref-update hook out of the ReceiveCommits implementation and into CommitValidators. Since then, the output of the ref-update hook is not sent back to the git client except in the case of an error or rejection. Update the handling of the ref-update hook in the plugin so that its output is returned back to the caller as a commit validation message which is then sent to the client. Change-Id: I88af8a3c690cc226214208c3c93f552f054ccae0 Reported-By: Robert Niemi <robert.den.klurige@googlemail.com>
* | | Remove call of ctx.saveChange() from example in plugin documentationEdwin Kempin2016-10-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In change I3d8b13 this method was renamed to ctx.bumpLastUpdatedOn(boolean). Calling it is no longer needed since the default for bumping the last updated on timestamp was changed to true by the same change. Change-Id: Ia8a4dd844fdad077c1173f4707f1bfe86aec4729 Signed-off-by: Edwin Kempin <ekempin@google.com> (cherry picked from commit 23033b634d70e338e1a5b837033bcdd003342df6)
* | | ProjectWatch: Filter out unrelated projects when getting from indexOrgad Shaneh2016-10-261-4/+7
|/ / | | | | | | | | | | | | | | | | The index is scanned by watched project, but if the user has the current project watched, all the user's watches are taken into account. They must be filtered by the project too. Bug: Issue 4633 Change-Id: I07ef6011da68c66d17d3a234f992087935eca489
* | Export prolog runtime in plugin APIDavid Ostrovsky2016-10-211-0/+1
| | | | | | | | | | | | | | | | In Ieb3666281 prolog compiler was exposed in the plugin API. Turns out that same plugins also need prolog runtime. Add it as well to simplify the build for those plugins. Change-Id: I22b74b8c9c13d529d65cb664173d23d7430b50a4