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
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
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
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
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
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
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
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
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
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
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>
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
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
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
* 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
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
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>
By adding the 'source_under_test', BUCK can now produce a
code-coverage HTML report for the plugin's unit tests.
Change-Id: Id35d66b93f554be1ff46ffa95064a58ad349c126
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)
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
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)
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)
Broken by d8af092c0a37025d84ced45903af2e52048d387e
dropping the license dependency from JARs by accident.
Change-Id: I64fcb042ee65dc554353b58bce22f9d1462985e2
(cherry picked from commit c535dd6e231821a940ef692ca36d8182b30ff80c)
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
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
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)