15081 Commits

Author SHA1 Message Date
Edwin Kempin
c2e8d073c1 Merge "Fix formatting of example email address for sendemail.from" 2015-07-02 13:03:31 +00:00
Edwin Kempin
067a47672f Merge "Document default value for suggest.fullTextSearch" 2015-07-02 13:03:08 +00:00
David Pursehouse
2d7237686a Merge "Buck: Allow to trigger Maven deployment even when nothing changed" 2015-07-02 12:31:16 +00:00
Edwin Kempin
b30bbccc75 Document default value for suggest.fullTextSearch
Change-Id: I05a999bc69909b05ea752e5a2661f29f888daf97
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2015-07-02 08:39:10 +02:00
Stefan Beller
09feaaccbc Add a possible tab "Submitted Together"
As the MergeQueue is gone we also submit ancestors
of a change on its submission. So we want an easy way
to inform the user what happens when clicking on the
submit button. Before the MergeQueue was removed the
"Same Topic" tab did this exactly as all the changes
listed there were submitted if change.submitWholeTopic
was enabled. (If it was disabled it was still there,
but the information was not of any value as topics do
not have meaning apart from informal bundling changes.)

To make a better user experience we need a tab which
displays all the changes which would be submitted,
when clicking on the submit button. As the "Same Topic"
tab comes close to this, we'll reuse it for this
purpose and rename it to "Submitted Together" to
hint at the intent of this tab.

Change-Id: Ie23970aa737da4041c2ed7bea84c34a9a376f8fe
2015-07-01 09:23:16 -07:00
Stefan Beller
bf2767cd64 GetServerInfo: Add change.submitWholeTopic configuration
This will help us later displaying the right tabs.

Change-Id: If801865597887b36eb54d858a2c7ce350cfc6582
2015-07-01 09:23:16 -07:00
Stefan Beller
a7ad6614df Add changes/<id>/submitted_together REST API call
This REST API call will answer the set of changes
which will be affected by submitting the given
change.

The options set are the same as were used for the
the 'same topic' tab, such that this call can be used
to service that tab eventually.

Change-Id: Ie1a3a72db132b3fda63f2602213269641c8d943f
2015-07-01 09:23:16 -07:00
Stefan Beller
27a5a068b4 Submit acceptance tests: disable waitForMerge
waitForMerge is deprecated and the documentation claims it's always
waiting for the Merge to be performed. Test this by disabling
waitForMerge.

Change-Id: Iccad04d3df49ae3d0bc5964c1b45d1849fbac4ce
2015-07-01 09:23:16 -07:00
Stefan Beller
7c13ccf2c7 SubmitByMergeIfNecessary: Test indirectly related changes
When we submit a change all its ancestors are also submitted. We need
to make sure that the ancestors also follow the submitWholeTopic rule.
That is if they have a topic all the changes with their topic needs to
be integrated as well.

This first two tests chain changes over 3 topics and the change in the
first and last topic are not related to each other except for having a
dependency over the second topic. Make sure all of these changes are
merged or none are merged.

The last two changes are testing the ancestor submission. The ancestors
may have changes which are targeted at the same branch or another branch.
We only collect the changes on the same branch. Even if there are open
and reviewd changes on other branches, we should ignore them
when submitting ancestors.

Change-Id: I7c6e5e864a3a0317104724621a29f6608646ad93
2015-07-01 09:23:16 -07:00
Stefan Beller
c5993446eb MergeOp: Operate on ChangeSets instead of branches
Operating on the set of changes instead of the set
of target branches, comes closer to what the user wants
and may have less racing errors.

Two new classes `ChangeSet` and `MergeSuperSet` are introduced,
the former being an auto value object which is just used for passing
around which changes are meant to go in together. The latter is a helper
class used by MergeOp to calculate the superset of the given change set
to be merged.

There is no queue any more. We either succeed or we don't
In case of failure we tell the user by throwing an exception
which translates into a 409 status code on the client side. This
is a behavioral change, so we have changes in tests as well.

Also we want to regain the possibility to submit a branch without
using a topic to group a set of changes. Before when the merge
queue was still there, you would submit the changes starting at
the head of the branch and backwards. When submitting the first
change in the branch all the changes would move from the SUBMITTED
state into the merged state as then the each change has all its
dependencies met.

To make this possible without the intermediate submitted state,
you only need to submit the latest change and all its dependencies
will be automatically submitted as well.

Change-Id: Ie30ac2974facc85eddde0f17e11466266342a357
2015-07-01 09:23:16 -07:00
Stefan Beller
52227e2f32 Submit: Remove scheduling possibility
There is no distinction between scheduling and merging
any more. So we don't need to offer such an option to
the user, killing the different code pathes in Submit
for easier readability.

Change-Id: I089a5cf49a7b866ab825a8009f81114fefbeae62
2015-07-01 09:23:15 -07:00
Stefan Beller
3846c1125f MergeOp: delete queueing code
And the test suite still passing means it was tested in
production only.

Change-Id: I8aaebb24a579bb8d9f7b62012cf8c5bc15ed7ece
2015-07-01 09:23:15 -07:00
Stefan Beller
e0b05955fd Kill the MergeQueue
The MergeQueue is a historical artifact of Gerrit from the time when
accepting submissions and merging was performed on different machines.
Nowadays this is done in the same process, so we do not require an
intermediate queue anymore (also the SUBMITTED state is superfluous).

This change will directly integrate a submission or refuse to do so
and complain to the user. Many user complaints about Gerrit at Google can
be translated to the existence of the MergeQueue as when something goes
wrong in the back end, all the user sees is a "SUBMITTED, MERGE PENDING"
state with delayed information when this is actually merged or if
there is a problem they need to address. This is an unfortunate user
experience, as patience is hard.

A common work flow is to submit a set of changes on one branch by submitting
the later changes of the branch first, such that these enter the merge
pending state and on submitting the first patch of the branch, all the
changes get integrated at once (such as by a single merge commit performed
by Gerrit).

This behavior doesn't work any more with this change, but you'd rather get
a notification when trying to merge a later change of the branch.
That work flow however will be enabled again in another patch of this
topic, when change submission also submits all changes it depends on.

I just don't want to bundle that with this change (as (a) this is already
a large change and (b) it is changing fundamental behavior).

Change-Id: I0c43b16a216db2a82aa0e59375a8a43482bb3b45
2015-07-01 09:23:15 -07:00
Stefan Beller
36a5b23a32 KillTaskIT: Combine tests
Looking at both tests, it was assumed implicitly to have more than one
task. As one task was killed by the first test, the second test still
could see at least one remaining task from the admins perspective,
but none from the users perspective.

As this implicit assumption doesn't hold anymore after we'll kill the
MergeQueue (and related to that the "Reload Submit Queue" background task),
we need to rewrite the tests such that not two or more tasks are assumed
for the whole test set in the KillTaskIt file.

When we would swap the order of the tests, the assumption is not required
any more as then the first test (killTask_NotFound) does (should) not
modify the state of the server, while the second test (killTask) can kill
a task just fine as it is the last test in the test set. (There is at
least "Log File Compressor" remaining after killing the merge queue, so
the tests are expected to just continue to work.)

We don't want to hide this subtle dependency, so make it one test method
only in the right order.

Change-Id: I72c3aaf940c0d02d429df55c7888c861632da24b
2015-07-01 09:23:15 -07:00
Stefan Beller
ffacb8c96b AbstractSubmit: Add optional project parameter to getRemoteLog
Later we want to query the remote log for more than just the standard
test project, so introduce an optional parameter, which defaults to the
standard test project such that we don't need to change any calling sites.

Change-Id: I310a8be74c18b93631e08ac13570499d03a0bf25
2015-07-01 09:23:15 -07:00
Stefan Beller
c8039a405a AbstractSubmit: Prepare checkMergeResult for use with different projects
Up to now project.get() and change.project were the same, but later we
will have changes at different projects, so we need to check the right
project.

Change-Id: Iedfffffe9f85b07842d3bb577d1f7fbab99268c2
2015-07-01 09:23:15 -07:00
Edwin Kempin
ebfbbacb8f Fix formatting of example email address for sendemail.from
It was formatted as:

  'Code Review' <’review'@'example.com'>`

Now it is formatted as:

  Code Review <review@example.com>

Change-Id: I59cbba7de91244ce7554133b851b4d133d15daea
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2015-07-01 16:04:27 +02:00
Edwin Kempin
38cd2859dd Merge changes from topic 'merge-stable-2.11-20150630'
* changes:
  Revert "AbstractSubmit, ActionsIT: Disable tests for submitWholeTopic"
  Merge branch 'stable-2.11'
  Update JGit to 4.0.1.201506240215-r.65-g3c33d09
2015-07-01 05:49:35 +00:00
Edwin Kempin
319e825862 Merge "Remove confusing comment plus redundant binding in DefaultCommandModule" 2015-07-01 05:48:49 +00:00
David Pursehouse
ec716e0728 README: better linkification
Change-Id: I26cc0e4f94a535de2a549fd43dd4ebcac2a9df7e
2015-06-30 16:31:12 +00:00
Shawn Pearce
a5d7c2e571 Merge "Add README" 2015-06-30 16:31:01 +00:00
Marco Miller
a10d6b7244 Remove confusing comment plus redundant binding in DefaultCommandModule
Remove confusing comment since command classes already tell such binding
code about being a master and/or slave command. Comment otherwise
becomes unnecessary as well as a maintenance trap -if any such master
/slave annotation changes in command class(es).

Remove redundant binding (duplicated line) for CreateAccountCommand
-still in DefaultCommandModule.

Change-Id: Ieaf8d98c951a3f471216cc651b22ad54eb6db6b6
2015-06-30 11:38:24 -04:00
David Pursehouse
522e4f8bd4 Script to abandon stale changes from the review server
Fetches a list of open changes that have not been updated since a
given age (default 6 months), and then abandons them.

Assumes that the user's credentials are in the .netrc file.  Supports
either basic or digest authentication.

Example to abandon changes that have not been updated for 3 years:

 ./abandon_stale --gerrit-url http://review.example.com/ --age 3years

Supports dry-run mode to only list the stale changes but not actually
abandon them.

Requires pygerrit (https://github.com/sonyxperiadev/pygerrit).

Change-Id: Ie0edb54847f9f2ab8204647e17e3893ed0a057ea
2015-06-30 14:02:00 +00:00
David Ostrovsky
0e5a1c37b5 Add README
Change-Id: I71faaddc3a6d6b3918b8bb6fc28f2256d7ed2b4d
2015-06-30 10:59:35 +00:00
David Pursehouse
15bd44bc47 Revert "AbstractSubmit, ActionsIT: Disable tests for submitWholeTopic"
The submitWholeTopic feature is enabled on the master branch; the
tests are only supposed to be disabled on stable-2.11.

This reverts commit 1c4a7ffc354b74f835f93405d113fa2e39b3fc1f.

Change-Id: Ie26594f5253c443f281f3b11e598f169a9c42353
2015-06-30 06:47:23 +00:00
David Pursehouse
e745ea2cfd Merge branch 'stable-2.11'
* stable-2.11:
  Update version to 2.10.6
  Release notes for Gerrit 2.10.6
  Correct file list when comparing patchsets
  AbstractSubmit, ActionsIT: Disable tests for submitWholeTopic
  Buck: Fix api build
  Remove org.json:json and fix gwt-dev deps
  Fix license generation
  Submit: Disable the 'submitWholeTopic' feature
  Pack prettify.min.{js,css} into documentation.
  Print proper name for project indexer tasks in show-queue command
  Print proper name for reindex after update tasks in show-queue command
  Set version to 2.11.2
  Update JGit to 4.0.1.201506240215-r
  Revert "Use changeRefsById to track existing revisions"
  ChangeUtil: Delete draft change inside database transaction
  Revert "Treat the search box oracle as a remote oracle"

The commit:
  Revert "Use changeRefsById to track existing revisions"

is reverted by this merge. The original change was reverted on the
stable-2.11 branch due to a regression and causes a merge conflict
against the current head of master.

Rather than try to resolve the conflic in this merge, my intention
is to either re-do the revert as a separate commit on master, or
try to find a solution to the regression that required the revert.

Change-Id: I563fac10e3ed6f572a78305876a2c37a5b5b04ea
2015-06-30 15:44:53 +09:00
Edwin Kempin
ee55115bed Merge "Document that onFailure() for REST calls from plugin is never invoked" 2015-06-30 06:03:23 +00:00
David Pursehouse
511ebefe6d Update JGit to 4.0.1.201506240215-r.65-g3c33d09
Includes the fix in 4.0.1.201506240215-r.65 release that was already
merged on stable-2.11:

  6b65adc Add a grace period for packfiles during GC

Change-Id: I53692783e3f78931417e6b37af34f3aefadeb1f7
2015-06-30 09:55:31 +09:00
David Pursehouse
5115b49b02 Merge branch 'stable-2.10' into stable-2.11
* stable-2.10:
  Update version to 2.10.6
  Release notes for Gerrit 2.10.6

Change-Id: I9bc2d68bbfe5f19081e8c7b26ca509628dd19c28
2015-06-30 09:33:54 +09:00
Edwin Kempin
57ab42c1e8 Limit the width for displaying project clone commands
Clone commands are shown as a CopyableLabels so that users can easily
copy them to the clipboard. This means that they do not need to be
fully shown.

The clone with commit-msg hook command can be very long, e.g. on
gerrit-review it runs out of the screen and users need to scroll to
the right to find the copy-to-clipboard icon.

Change-Id: Id9f463cb784f17dac357310ce365f255dba493b2
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2015-06-29 16:07:41 +02:00
Edwin Kempin
59b0d8bf71 Merge "Add reparent plugin to plugin documentation" 2015-06-29 13:16:58 +00:00
Edwin Kempin
f968e9d908 Merge "Allow plugins to reparent projects for non-administrators" 2015-06-29 13:16:58 +00:00
Saša Živkov
b029d38ed9 Update version to 2.10.6
Change-Id: I2e41f2b6044563f4f63324fa50ad8ed3145d8c24
v2.10.6
2015-06-29 14:19:38 +02:00
David Pursehouse
940c68f48c Release notes for Gerrit 2.10.6
Change-Id: I49b5094db78ca28e0ae56732670e9f0f62b310b2
2015-06-29 14:10:30 +02:00
Edwin Kempin
9b8240b0f6 Merge branch 'stable-2.10'
* stable-2.10:
  Fix license generation

Change-Id: I13ecad4191eee92ce9daa863d635cfe3cd9d6abb
2015-06-29 11:16:49 +02:00
David Pursehouse
f3a18831fb Update replication and cookbook plugin revisions
By adding the 'source_under_test', BUCK can now produce a
code-coverage HTML report for the plugin's unit tests.

Change-Id: Id35d66b93f554be1ff46ffa95064a58ad349c126
2015-06-29 15:53:35 +09:00
David Pursehouse
157384e3ba Merge "ChangeUtil: Delete draft change inside database transaction" into stable-2.11 2015-06-29 03:20:07 +00:00
David Pursehouse
6697c453fc Merge "Correct file list when comparing patchsets" into stable-2.11 2015-06-29 03:19:49 +00:00
David Pursehouse
3039270a7b Merge changes I6168fda0,I54df92da into stable-2.11
* changes:
  Buck: Fix api build
  Remove org.json:json and fix gwt-dev deps
2015-06-28 12:14:26 +00:00
Hugo Arès
be910538a5 Correct file list when comparing patchsets
When comparing a patchset with another one, the added and deleted files
were not displayed properly:

-change 1,1 is adding file a, c and deleting d
-change 1,2 is adding file a, b and deleting d

When comparing 1,1 to 1,2, the file changed list should show that b was
added and c was deleted but instead it was showing that only b was
added.

When comparing 1,2 to 1,1, the file changed list should show that b was
deleted and c was added but instead it was showing that only c was
added.

I know that this behavior was intended[1], i.e. when comparing patchset
with each other, the file list will not include files not in the base.

The problem is that behavior was perceived as a bug by our users. When
they compare patchset between each others, they expect to see the full
list of files changed, even if the file is not in the base.

[1] https://gerrit-review.googlesource.com/#/c/57086/4//COMMIT_MSG@10

Change-Id: I1bd7e6354617d921a77115c47543328a4a66999f
(cherry picked from commit 314a096181e205faae5b0b66847b19d23db1d5d6)
2015-06-26 14:27:43 +00:00
David Pursehouse
1c4a7ffc35 AbstractSubmit, ActionsIT: Disable tests for submitWholeTopic
Forcibly disabling submitWholeTopic in commit 462f4ac causes several
acceptance tests to fail because they expect it to be enabled.

Remove the submitWholeTopic configuration for those tests.

Note that this patch should be reverted when stable-2.11 is
merged up to master.

Change-Id: I2d46a76516ae7f5fb41083db8c337ac8ecaa46ca
2015-06-26 07:53:53 +00:00
David Ostrovsky
32bed1d285 Buck: Fix api build
gwt-dev dependencies were moved from external constant to maven_jar()
exported_deps dependency in I54df92daf. As the consequence, maven_jar
makes from it java_library instead of prebuil_jar. As the consequence
java_library without sources and resources doesn't expose output jar.

This broke java_doc() rule in gwtui-api that makes use of $(location)
macro. This macros is failing on libraries without own output jar.

To rectify it, expose intermediate prebuilt_jar from maven_jar() rule
with the same visibility scope as the final artifact. Now it can be
used in java_doc() as it exposes output jar and exported_deps aren't
needed in this context.

Change-Id: I6168fda0aba8827063958f80c6e2828b0a6941f8
(cherry picked from commit 1da31b3520b7314c36c06af49a427c869b445742)
2015-06-26 16:02:29 +09:00
Edwin Kempin
996e5dfe21 Merge "Correct file list when comparing patchsets" 2015-06-26 06:42:30 +00:00
Shawn Pearce
07703c1520 Remove org.json:json and fix gwt-dev deps
GWT 2.7 dev JAR no longer lists org.json:json as a dep in its pom.xml
file.  Instead it requests ow2-asm.  Fix the dep list to drop the
difficult org.json:json and put in the requested ow2 JARs.

Move ow2-asm deps down onto gwt-dev JAR where they belong.  These are
required by the compiler code inside gwt-dev, not user code linked
with gwt_module().

Change-Id: I54df92daf40d77e61bed4ed4b549981e8d798ca1
(cherry picked from commit b0735a3c02fd930699176b54a0a99f0861272ad4)
2015-06-26 06:29:43 +00:00
Shawn Pearce
e84818734f Fix license generation
Broken by d8af092c0a37025d84ced45903af2e52048d387e
dropping the license dependency from JARs by accident.

Change-Id: I64fcb042ee65dc554353b58bce22f9d1462985e2
(cherry picked from commit c535dd6e231821a940ef692ca36d8182b30ff80c)
2015-06-26 08:14:23 +02:00
David Pursehouse
462f4ac028 Submit: Disable the 'submitWholeTopic' feature
The 'submitWholeTopic' feature is not ready for use on 2.11.x
but the option was still being honoured.

Ignore the option; force the feature to always be disabled.

Note that this patch should be reverted when stable-2.11 is
merged up to master.

Change-Id: I2eba40636edec16af1c3161416d95a88743e6648
2015-06-26 06:05:09 +00:00
David Pursehouse
81e5077c55 Merge changes I282a8fc7,I5fceac93 into stable-2.11
* changes:
  Print proper name for project indexer tasks in show-queue command
  Print proper name for reindex after update tasks in show-queue command
2015-06-26 05:58:55 +00:00
David Ostrovsky
f3285e0280 Buck: Fix eclipse project generation
After refactoring done in Ia46c0559a lib/jgit is recognized as source
folder for the non existing Edit patch library:

  $ buck audit classpath //gerrit-gwtui:ui_module
  buck-out/gen/lib/jgit/lib__Edit__output/Edit.jar

As the consequence non existing path is induced from it and included
in .classpath file:

  path="/home/davido/projects/gerrit/lib/jgit/src/main/java"

Add a check for existence of source folder and include it only if the
folder exists.

Change-Id: Icef39196173722c9c8b760c041a4c9ec9d22ab7c
2015-06-26 05:41:48 +00:00
Edwin Kempin
cd9dab02e4 Merge "Plugin Archetypes: Update year of licences in archetype resources" 2015-06-26 05:11:48 +00:00
Yuxuan 'fishy' Wang
5f6ecc4bbd Pack prettify.min.{js,css} into documentation.
Pack prettify.{js,css} files from gerrit-prettify into the documentation
package as prettify.min.{js,css}.

Bug: Issue 3440
Change-Id: I86585477fc43781768d4883c97c5c275b5bb8760
(cherry picked from commit 894dd9d103881db3e5c7c75dff4b7b0043aedcf2)
2015-06-26 03:04:09 +00:00