Migration is implemented to either replace draft changes with private
(default) or work-in-progress changes.
We bump the change index version to trigger online reindexing.
That's needed because we don't support reindexing during init step, and
we need to reindex all changes, because DRAFT is removed from the
Change.Status enum and index still contains the old references to the
changes that were migrated to private or work-in-progress changes. To
make online reindexing work, draft status is replaced with the new
change status.
PolyGerrit UI is not addressed in this change and will be done in a
follow-up change.
User branches are not updated in this change to clean-up My-Menu entry
in user preferences. This will be done in a follow-up change.
refs/meta/config is not updated in this change to clean-up draft
related permissions. This will be done in a follow-up change.
ChangeControl#isPatchVisible() call sites are migrated to the
ChangeControl#isVisible() and isVisible() is made public again. This and
other temporary changes to ChangeControl class will be cleaned up in
follow up changes.
Bug: Issue 6880
Change-Id: Icfcb34efe1ff0ea1d39e94ed500db776f5770d8f
This change is driven by the RFC proposal[1] to show label
transitions more explicitly in Gerrit. Stream events only
provides label information on review events that contain
a vote transition. When a user submits a review with only a
reply message the approvals information is not added to the
stream event and hooks. This change will make Gerrit append
approvals info to every comment-added event including the
ones that do not contain vote changes.
Since labels are shown for every event we will add an 'oldValue'
property to the approvalAttribute to distinguish when a vote
transition has occurred. The 'oldValue' attribute contains
the previous vote score. This attribute will only appear when
there is a vote transition.
The comment-added stream event will look like this:
"approvals":[{"type":"Code-Review","description":"Code-Review",
"value":"-1", "oldValue":"0"}, {"type":"Verified",
"description":"Verified","value":"0"}],
"comment":"Patch Set 1: Code-Review+1\n\nMy Message" ...
This change will also a '--$LabelName-oldValue' parameter to
corresponding comment-added change hook:
hook[comment-added] output:
--change I2cd8327360ff89338a4e7f0591bf0c037e9aa5db
--is-draft false --change-url http://localhost:8080/201
--change-owner John Smith (jsmith@gmail.com) --project okc
--branch master --author John Smith (jsmith@gmail.com)
--commit 55079187f7ce1c461de804c13f2dd71d64a85280
--comment Patch Set 1: Code-Review-1 --Code-Review -1
--Code-Review-oldValue 0 --Verified 0
[1] https://groups.google.com/d/msg/repo-discuss/soqmGjRpl-4/IIfAF4jbCQAJ
Bug: Issue 3220
Change-Id: Ibc1c64d70e790c7b507db79931f31fd77f25e276
RefUpdated events have an attribute called refName. EventFactory would
create this attribute using the short name, which is inconsistent
since all other events use full ref names. Create the event with the
full ref name.
Change-Id: I45dc114f48b801d0e5c9877c30e0526b8ecb8adb
Covers the case when nothing has changed except the commit
of the rebased patch set. This is possible when a patch set is
rebased on target branch.
With this patch, when PS1 is rebased (without modification) to PS2
the Verified+1 and Code-Review+2 will be copied since PS1 and PS2 are
effectively the same change with different commits.
----- (B) ----- (B+M) ----- (B+M-M)
\ \
----- (PS1) ----- (PS2)
Change-Id: I6a8ebd3c83ca6167cfc826267a057a871c752ff6
It has not been used by the search system since 2.8 and all code using
it in a meaningful way in Gerrit has been removed. Now we can remove
it from the database and API classes.
This requires a schema upgrade to delete the column and rebuild some
indexes to use last_updated_on instead of sort_key.
Change-Id: I87660f8e0e44bf11bafd9fa24f990351759df3fb
* stable-2.9:
Add CSS style name on review comment div
Fix incorrect formatting in json documentation
Don't use deprecated PGPPublicKeyRingCollection constructor
Add InitStep to fix wrong primary key column order
Change-Id: Id89fc4ec6684396ce13acb57f925fcff53f6b06e
The ChangeKind attribute exposed in the JSON was incorrectly written
originally. The correct attribute in the JSON is "kind".
Change-Id: I225bb4cdb486810d8f8c3a3c9969a13ce70a0365
Pass along an extra flag in the patchset-created hook to convey
the change kind. This is also exposed in the PatchSetCreatedEvent
as the "kind" field. Both follow the ChangeKind enum type, where a
change can be "REWORK", "NO_CODE_CHANGE", or "TRIVIAL_REBASE".
Bug: Issue 2634
Change-Id: Ie04d0282e42ab177810fafd857e90d21999cab28
We previous use the section title style like:
Section level 1
===============
Section level 2
---------------
Which have a problem in Asciidoctor that the number of "="s or "-"s must match
the number of characters in the header exactly, as a result it's easy to make
mistakes while changing the titles. Asciidoctor provides a better style like:
= Section level 1
== Section level 2
So we switched to this style.
Also fixed a bug in replace_macros.py, which will not cause any problem in the
old style.
Change-Id: I811dd7238735d98f662767c17086152cd69aea02
The new allReviewers parameter allows users to view the name and
email of all reviewers which are added to a change (irrespective of
whether they have been voting on that change or not).
Feature: Issue 2102
Change-Id: I655a49c37b959eb2f0bb705e2c45cb9bdc33ea23
Thereby, stream event consumers can differentiate between events that
are tied to a draft patch set and those that are not.
Change-Id: Idbdcfc979f2383de0708560bf2e148fcc51d612f
Commit ef38c07 renamed PatchResource to FileResource.
Although the code change does not affect the content of the JSON
data, update the documentation to make the description consistent.
Change-Id: I3598d4d40c95817e2e676006085046cce108e2ac
- Add a statement that the result is always for the latest patch set,
even if the query matched on an earlier patch set
- Add a link to the change attribute documentation from the JSON
format option description.
- Add clarification in the change attribute documentation that the
commit message is of the latest patch set.
- Correct a minor typo
Change-Id: Ie6a825d1d183994926662c0ad8c42ec15f687e51
When a file is renamed, the value of `file` in the Patch attribute
is the new file name. The old file name is not included.
This means it is not possible to find the old file name by running
a gerrit query command.
Add a new field `fileOld`. When the file is renamed, this field
contains the old file name.
The name of the existing field is unchanged. Renaming to `fileNew`
would make the name more meaningful and consistent with `fileOld`,
but would make it incompatible with user scripts that expect it to
be called `file`.
Change-Id: Ie29c9ea31a6d73ab7ff0c91bf0c10dc10c3636d6
The `submitRecords` field is included twice in the documentation
of the `change` attribute. Remove the duplicate.
Change-Id: Ib859a3a83930ec34715c496486fc42ef1ce8e8b4
* stable-2.5:
Fix order of top-level menus
Ensure that ObjectOutputStream in H2CacheImpl is closed
Flush persistent H2 cache if the existing entries are incompatible
Fix plugin loading when running as hosted WAR or GWT DevMode.
ChangeMessageAccess: Add index for byPathSet method.
File indentation is sometimes wrong in Side-By-Side
Move the Groups and Plugins menu items to the top level.
Call inserter.flush() when creating code review notes
Add ssh command "test-submit-rule"
Split up canSubmit()
Add submit records to query output.
Conflicts:
Documentation/json.txt
gerrit-gwtui/src/main/java/com/google/gerrit/client/Gerrit.java
gerrit-server/src/main/java/com/google/gerrit/server/project/ChangeControl.java
Change-Id: I6f9d44cfbd7060d65c8eb8a399d089a88f9bc697
Add author information to output of query options:
'--patch-sets'.
'--current-patch-set'.
Add size information to output of query options:
'--patch-sets'.
'--current-patch-set'.
'--files'.
This information can now be retrieved by both SSH and
the HTTP REST API.
Change-Id: I7ef0f2dce6a4d2bd2dd2532e4bb48a22522b659a
Signed-off-by: Bruce Zu <bruce.zu@sonymobile.com>
Documentation is missing for several JSON attributes. Add it.
Also fix a minor typo in Patch.java comments, where some of the
added documentation is copy/pasted from.
Change-Id: I1bb33384a668ebc5c4b778773a59ba1291100660
Add a command line option to the gerrit query ssh command to include
submit records in output.
This facilitates the querying of information relating to the submit status
from the command line and by API clients, including information such as
whether the change can be submitted as-is, and whether the submission
criteria for each review label has been met. Example output:
submitRecords:
status: NOT_READY
labels:
label: Verified
status: OK
by:
name: James E. Blair
email: corvus@example.com
username: corvus
labels:
label: Code-Review
status: NEED
Change-Id: If13393aadfcce75a049d9b15c7467cb8df5570d9
Add a command line option to the gerrit query ssh command to include
submit records in output.
This facilitates the querying of information relating to the submit status
from the command line and by API clients, including information such as
whether the change can be submitted as-is, and whether the submission
criteria for each review label has been met. Example output:
submitRecords:
status: NOT_READY
labels:
label: Verified
status: OK
by:
name: James E. Blair
email: corvus@example.com
username: corvus
labels:
label: Code-Review
status: NEED
Change-Id: If13393aadfcce75a049d9b15c7467cb8df5570d9
Commit e0169338466d870ccd5867f3bb13cd3a094d1efb added an REST endpoint
for querying the global capabilities of the calling user. Not all
features of this endpoint that were described in the commit message
were contained in the REST API documentation.
Change-Id: I5221b2f180b9deda69a5beec0bacf5033e7bd511
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Some attributes contained in the events were not described, for a few
others the name was given in a wrong case.
Change-Id: I3b6b1f400a1b040ca9acfd57b20eef9d2d92aaa5
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
If the user adds a flag to the query parameters, include the full
commit message in the result data. This is helpful when verifying
commit messages and with similar tasks.
Change-Id: Iff93bfebfa0c5e2209be29fe60ae12809a76479a
Whenever a ref is updated via either a direct push to a branch or a
Gerrit change submission, Gerrit will now send a new "ref-updated"
event to the event stream. This can be used by external agents for
things like automatic submodule ref updating, replication, build bot
hooks, etc.
Change-Id: Ice9d65db8fd662d53df53ff6b61d811815c9f2f6
Define an SSH command that offers the ability to query for change
summary information. This provides the same information as a listing
on the web interface.
The query command is also available over HTTP under the /query URL,
with the query string supplied as the q parameter.
Bug: issue 504
Change-Id: I72fc11dc8872b781bcd6895b3bcd90d85f22e419
Signed-off-by: Shawn O. Pearce <sop@google.com>