* stable-2.15:
BranchApi: Add missing throws declaration on NotImplemented#reflog
FormatUtil: Fix Math#round() truncation error flagged by error-prone
ReflogIT: Add test coverage for reflog permissions
ChangeIT: Move reflog test to ReflogIT
ChangeIT: Fix and expand reflog test
BranchApi: Add method to get the branch's reflog
GetReflog: Move ReflogEntryInfo to a separate class in extension API
Fix http_archive rule in WORKSPACE
ConfigInfoImpl: Return raw byte value for effective value
TransferConfig: Move getEffectiveMaxObjectSizeLimit to ProjectState
ProjectIT: Factor out a method to set the max object size limit
Documentation: linux-quickstart - include Java 8 requirement
Documentation: Include Java 8 requirement in installation notes
Documentation: Remove 'install-quick' page in favour of 'linux-quickstart'
Change-Id: I895790a8b2f9e8439e91c15ba4ee9a5a14a4ee94
* stable-2.14:
BranchApi: Add missing throws declaration on NotImplemented#reflog
FormatUtil: Fix Math#round() truncation error flagged by error-prone
ReflogIT: Add test coverage for reflog permissions
ChangeIT: Move reflog test to ReflogIT
ChangeIT: Fix and expand reflog test
BranchApi: Add method to get the branch's reflog
GetReflog: Move ReflogEntryInfo to a separate class in extension API
Change-Id: I209a4450771ebb640e6997e11d24d699ba20a033
Building with Bazel@HEAD: [1] is failing with this error message:
FormatUtil.java:129: error: [MathRoundIntLong] Math.round(Integer) results in truncation
| int p = Math.abs(Math.round(delta * 100 / size));
| ^
| (see https://errorprone.info/bugpattern/MathRoundIntLong)
| Did you mean 'int p = Math.abs(Ints.saturatedCast(delta * 100 / size));'?
To rectify, replace Math.round() with Ints.saturatedCast() and borrow
this method from Guava library because Guava cannot be currently used in
GWT client code.
[1] https://github.com/bazelbuild/bazel/issues/5944
Change-Id: I1c88102d4d027796594fb7cdcde4f0ec4921d4ad
* stable-2.14:
Fix http_archive rule in WORKSPACE
ConfigInfoImpl: Return raw byte value for effective value
TransferConfig: Move getEffectiveMaxObjectSizeLimit to ProjectState
Change-Id: Ib58995f7f6db32e2585c285b3d3dceb6b358848f
The 'value' field of the info shows the effective value that gets
applied. Set it as the actual byte value rather than the formatted
value which could be using any arbitrary unit suffix (within the
scope of the suffixes actually supported).
In the UI, always show the effective value, rather than only when
there is a global value, and explicitly say when there is no value
configured.
Note that the UI changes are only in GWT because the project info
screen is not implemented for Polygerrit on this branch. The same
changes can be applied to Polygerrit in a follow-up commit after
this has been merged up to stable-2.15/master.
Change-Id: Ibb88d734e6a322ee90f66d1b4c4a3882d2e0654a
* stable-2.15:
ChangeIT: Move reflog test to ReflogIT
ReflogIT: Move to com.google.gerrit.acceptance.server.project
ReflogIT: Remove unneeded setUp method
ChangeIT: Fix and expand reflog test
ProjectState: Remove unnecessary 'final' modifiers from constructor
ConfigInfo: Annotate MaxObjectSizeLimitInfo fields as nullable
ConfigInfo: Add Javadoc for MaxObjectSizeLimitInfo fields
Upgrade JGit to v4.5.4.201711221230-r
Fix deprecation warnings from latest JGit update
Upgrade JGit to 4.3.0.201604071810-r
Set version to 2.12.9-SNAPSHOT
Buck: Fix typo in gerrit_plugin.bucklet
Remove min width from autocomplete container
ConfigInfoImpl: Factor out initialization of MaxObjectSizeLimitInfo to a method
Rename instances of TransferConfig to transferConfig
Clarify inherited_value in documentation of MaxObjectSizeLimitInfo
Reword docmentation of project specific object size limit for clarity
PutConfig: Reload project config before returning response
Fix partially hidden plugin configuration in the UI
Upgrade PostgreSQL JDBC driver
SiteProgram: Extract local variable
SiteProgram: Extract constant
SiteProgram: Inline variable to avoid hiding field
DataSourceProvider: Rename local variable to avoid hiding field
DataSourceProvider: Remove unneeded finals
DataSourceProvider: Replace inner class with lambda
DataSourceProvider: Extract constant
Add current patchset to json when a review is public/ready
Migrate `tools/bazel.rc` to `.bazelrc`
ProjectIT: Add tests for maxObjectSize configuration
EventRecorder: Add assertNoRefUpdatedEvents helper method
ProjectIT: Rename 'config' method to 'submitType'
Change-Id: I83eee5496f538daff37c936dcb1cc19f13b27705
In project setting page, plugin configurations were partially hidden if
value had more characters than the default number of characters
displayed in the text box.
For users who can edit the configurations, this is not an issue as they
can see the hidden part by moving the cursor in the text box. Users
which cannot edit the configurations, the field is disabled preventing
them to see the hidden part.
Fix it by making the text box wider if needed. This fix is not ideal
because if the value is really long, then the text box could be wider
than the screen size causing an horizontal scroll bar to appear.
An other option would have been to set the attribute "readonly" instead
of "disabled" which would allow users with no edit rights to see the
hidden part by putting the cursor in the text box. The problem is not
all the input controls used in the project page support setting the
readonly attribute so the code change would be more complex and
intrusive.
Since GWT UI is going away, go with the more simple and less intrusive
solution which is to make the text area wider when needed.
Change-Id: I189e9482cc03043819cb0077f6ea10d3585edb9d
Add "Delete Changes" permission to constants so that it is displayed
properly in GWT UI.
Change-Id: I8b71afa8ed1507b3ca6f8ae1a5c48575c2477281
Signed-off-by: Jacek Centkowski <jcentkowski@collab.net>
* stable-2.15:
Polygerrit: Always create new changes as WIP
ElasticIndexIT: replace member with local variable
Elasticsearch tests: remove password duplication
Fix call to the fail skylark global in junit.bzl
Set version to 2.14.11-SNAPSHOT
Set version to 2.14.10
AbstractQueryChangesTest: Add byMessageSubstring test
AbstractQueryChangesTest: Expand byTopic with more 'intopic' tests
Elasticsearch: Add char analyzer to ensure consistency of query results
Elasticsearch: remove overridden build assignment
Elasticsearch: run no other test at the same time
ElasticVersionTest: run it through bazel as well
Elasticsearch: cover V5 and flaky V6 tests -for CI
Split Elasticsearch query tests into separate rules
dev-contributing: Document that we format .bzl files with buildifier
Add account setting for defaulting new changes to WIP
Add project setting for defaulting new changes to WIP
Apply buildifier to .bzl files.
Update Bower to 1.8.2
Bump commons-io version to 2.2
Add missing elasticsearch dependency in pgm tests
Highlight.js: style gr-syntax-name as gr-syntax-keyword
Elasticsearch: remove unnecessary test build deps
Clarify behavior of "Ignore" feature in REST API documentation
Expose commons-compress in plugin API
Bump commons-io version to 2.2
Change-Id: I99edb118d193ebe9150f89a902a1407e69711cfc
The GWT UI always appended a newline character to the diff content it
received from the server, no matter whether the file contained a
newline at the end or not. Since the server now sends an empty string
if there is a newline at the end, we don't need the workaround anymore.
Change-Id: I0da144366d3245e88e4e5529828ac1f900f46fd3
Create change online dialog wasn't extended in this change to respect
new added work-in-progress account setting to initialize the checkbox
accordingly. In PolyGerrit UI the WIP Change checkbox is shown and could
be set if needed, in GWT UI the work-in-progress flag is always set
implicitly.
Feature: Issue 8866
Change-Id: Ibf537436841b755c946a6c329100f94a22774f68
If AccessSection directly returns its modifyable list, callers can
modify the list outside of AccessSection. This is bad because this way
it is possible to violate assumptions of the AccessSection class. E.g.
AccessSection makes sure that the permission list cannot contain
duplicate permissions. Having duplicate permissions in the permission
list can lead to severe problems. E.g. duplicate permissions on an
access section of the All-Projects project make the permissions of the
All-Project project unreadable and Gerrit effectively stops working.
This is because ProjectState#getLocalAccessSections() filters out some
permissions on the All-Projects project by getting the list of
permissions from AccessSection and setting the filtered list back on
AccessSection. If the list that was retrieved from AccessSection
contained duplicate permissions, setting back the list failed with
IllegalArgumentException since
AccessSection#setPermissions(List<Permission>) doesn't allow duplicate
permissions.
A similar issue was already fixed by change I5222cd9174 and change
Ief24c6e82f.
Ideally we would return an ImmutableList from
AccessSection.getPermissions() but we cannot use ImmutableList in
classes that are used by the GWT UI.
Change-Id: I61f0baf6deb5c4ba1b609aacaabeb1f149f444d9
Signed-off-by: Edwin Kempin <ekempin@google.com>
It is confusing, and has an even more confusing tooltip:
The change cannot be merged due to a path conflict...
Change-Id: I238753fa93166ff95283f283b1c52342229391c1
* stable-2.15:
Add optional dir_name argument to gerrit_plugin
Format WORKSPACE and BUILD files with buildifier version 0.12.0
Move commons-io from lib/BUILD to lib/commons/BUILD
Change-Id: I63bf9cec7e81f3f0f7ef88addf99e544bc1d7479
* stable-2.14:
Format WORKSPACE and BUILD files with buildifier version 0.12.0
Move commons-io from lib/BUILD to lib/commons/BUILD
Change-Id: I6130353f0cceed80b370e5566d329acd7e0829b3
Turn PolyGerrit UI status from experimental to default UI. Remove the
option to disable PolyGerrit UI. This is the next step toward removing
of GWT UI.
We keep gerrit.enableGwtUi option, so that gerrit site administrators can
remove GWT UI and make PolyGerrit the only supported UI already now and
not wait until GWT UI is removed in upcoming releases.
Change-Id: Ie5c658488962911c3a113b08ce1768858f12db07
* stable-2.15:
AbstractQueryChangesTest: Add byMessageMixedCase test
ElasticContainer: replace the deprecated override
ElasticVersion: remove redundant private modifier
ElasticIndexVersionManager: remove unneeded type
Elasticsearch: make package-private usage explicit
MyPasswordScreen: Fix default text in password field
Move: Return the modified change in JSON response
Elasticsearch: fix changes index type for bulk calls
RevisionIT: Add test for posting review comment on non-existing file
PostReview: Use correct patch set ID to reject comment on non-existing file
Don't fail on removing star labels from change without star labels
AbstractQueryAccountsTest: Add byDeletedAccount to ensure consistency
AbstractQueryGroupsTest: Add byDeletedGroup to achieve higher coverage
Elastic{Account,Group}Index: Move the static Logger right after class
Elastic{Account,Change,Group}Index: Make names/types explicitly private
{Account,Change,Group}Mapping: Set package-privacy
Docs intro-gerrit-walkthrough: Rewrite for v2.15 PG UI
Add integration test classes for "ssh index" commands
ActionJson: Add workInProgress to ChangeInfo copy method
Allow to toggle ready flag by project owners
Allow to toggle WIP flag by project owners
Upgrade JGit to 4.9.2.201712150930-r.15-g5fe8e31d4
Bazel: Harmonize names of external repositories
The changes done in I4598a6fb9 ("Allow to toggle ready flag by project
owners") and I259a170ed ("Allow to toggle WIP flag by project owners") are
adjusted to replace usage of ProjectControl with PermissionBackend.
Change-Id: I82443ea0e4f2d5a3db2169bbbe129a10520adc0a
The default text says:
"click 'generate' to revoke an old password"
but the label on the button is actually 'Generate Password'.
Change the text to be consistent with the label. At the same time,
move the text into the AccountConstants class.
Change-Id: I2220103237c71d653f62fbf76ea866604f195d65
* stable-2.15:
Change "WorkInProgress" to "Work in Progress"
ChangeTable: Show "Work in Progress" in status column
ChangeScreen: Don't show "Merge Conflict" for submittable WIP change
Change-Id: I17aebee341f16b25167620a526f6daa3653a23d4
When a change is in WIP state it was not shown in the status column.
Furthermore, when a WIP change had all the necessary labels to allow
submit, its status was shown as "Merge Conflict".
Bug: Issue 8643
Change-Id: I6a063cc84d306d9471617ff365d2aa06046b59c2
If a change had all the necessary labels to allow submit, but is still
in the WIP state, the status showed as "Merge Conflict (WorkInProgress")
on the change screen.
The reason is that the "mergeable" flag is not set in the change info
when a change is WIP.
Add a condition to prevent setting "Merge Conflict" if a change is WIP.
Now it says: "Review in Progress (WorkInProgress)".
Bug: Issue 8643
Change-Id: Ia2960e8824e8d6f975adb545a73dd2a7accf0469
The migration contains a bug which causes project.config to become
unreadable, breaking a site until it is fixed. A fix is in progress[1],
but there are still some open questions that we don't have answers to.
Revert the functionality for now, to give us time to fully bake a fix.
This reverts the following commits:
9ff07177eae4970c1773682cbfc503b329b93e78
8392e982c0fc0f2a73397fab18a381cec050514f
66c52dae95e16c1bcce9dad4ae91bfc6c0dc04ab
642f3e07e7cb98a997e15569ae01a6952a9bce67
[1] https://gerrit-review.googlesource.com/c/gerrit/+/173513
Change-Id: I139ba7aa97a946f2c31258e7dfaa3a94ee72ff6e
Add "Submit on Push" option to the Submit Permission and remove
the "refs/for/"-way of allowing this.
This change introduces a "Submit on Push" option for the Submit
permission, which will enable the %submit push parameter.
Any "submit refs/for/*" permission will be automatially migrated
when the config is loaded.
Change-Id: I6106ecf289bef541fa273d3deebead7a3a9710ac
This is the first change in a series that intends to getting rid of
refs/for/ from ACLs.
The migration from "push refs/for/*" to "create-review refs/heads/*"
is handled on-the-fly when the configuration is loaded.
Any "push refs/for/*" permission will be automatially migrated to the
new "Create Review" permission and the old permission will be removed
if possible (e.g. push refs/* will create a new Create Review permission,
but keep the old permission since it will affect refs/{heads,meta}/*).
When the rest of the refs/for/ dependent permissions are migrated, an
offline schema migration should be available to help correct all configs,
though the online auto migration should be available for a few major
versions to help fix ACL-mistakes by users.
Change-Id: Ia112adeb7593a7b4a7a8b5d8b96f72f73c9b70b8
The group name is missing if there is no group backend that can resolve
the UUID. This can e.g. happen if the singleusergroup was used and
single user groups have been added to Gerrit groups, but then the
singleusergroup plugin was uninstalled so that the single user groups
can no longer be resolved.
Change-Id: I1bccec4bb38b55f6ad9b2d2ac83227b379d09071
Signed-off-by: Edwin Kempin <ekempin@google.com>
(cherry picked from commit 92f58f80b1eb8f763266d96a9be0705a2535b178)
Adjust documentation accordingly. PolyGerrit uses the sort name
"Publish comments on push", and it was not possible to find this name in
the documentation.
Change-Id: Ib9797b43f4b2ac028dbbeab95287b34ec25de067
SubmittedTogether potentially returns hundreds of changes.
CURRENT_COMMIT requires opening the repository that contains the change
to load more information about the commit. This can make the endpoint
very slow (>1 minute for 500 changes).
SubmittedTogether already provides a way of specifying additional
options for ChangeJson. Therefore removing an option from the defaults
seems safe as users that still want to receive commit information can
just specify o=CURRENT_COMMIT on the request.
This commit specifies this option for the GWT UI so that we don't run
into (potential) issues with WebLinks. Since the GWT UI will be deleted
soon, keeping it on the slow version of the endpoint seems OK.
This commit also implements a lazyload boolean in SubmittedTogether.
This forces the default call to not do any lazyloading which helps us to
catch issues earlier. The boolean is updated if the user specified an
option that requires lazy loading.
Change-Id: I763d15447fa79846fe0656a869b15edcf8502cb5
Fix two test failures due to the merge:
* StandaloneNoteDbMigrationIT assumed that GCing All-Users would prune
all loose objects, whereas in recent JGit versions, unreachable
objects are left loose unless gc.pruneExpire is set to "now". Do this
in the tests.
* AbstractQueryChangesTest#watched modifies the user's project watches.
In the master branch, watches are now stored in the AccountState
instance, so we need to recreate the IdentifiedUser in order to reload
the AccountState.
* origin/stable-2.15: (33 commits)
Release 2.15
Mention groups index in documentation of index start command
Enable UI action to toggle WIP flag for admins
Docs: Clarify that for external groups the name in GroupInfo can be missing
AccountGroupAuditLogScreen: Display group UUID if group name is missing
GetAuditLog: Fix NPE if group UUID cannot be resolved
Limit assignee suggestions to users that can see the change
Add account predicate that checks if user can see a certain change
Allow admins to toggle the WIP flag on all changes
Included-In dialog polish
PolyGerrit: Add support for "Included In"
Make template testing faster
Limit assignee suggestions to users that can see the change
Add account predicate that checks if user can see a certain change
AbstractQueryChangesTest: Extend byDraftBy to include test for "has:draft"
AbstractQueryChangesTest: Add explicit tests for is:watched and watchedby:
AbstractQueryChangesTest: Add explicit tests for is:abandoned and status:abandoned
user-search: Clarify behavior of default search resulting in single change
user-search: Fix query used in "My > Watched Changes"
Documentation: Clarify ref-updated event content when ref is deleted
Update git submodules
Fix markup in Documentation section sendemail
Allow graceful rolling restarts
Release 2.15-rc4
user-search: Remove incorrect statement about default searches
user-search: Fix incorrect label: search example
StandaloneSiteTest: Ignore user and system git config
Fix documentation about create and delete branches
GcAllUsers: Respect gc.auto=0 in All-Users
GcAllUsers: Add extra log line in online case
MigrateToNoteDb: Auto-flush and close GC writer
Turn off autoReindexIfStale by default
GC All-Users after migrating to NoteDb
Change-Id: If2dff6bd1e0b299be75878aca3bc45103a5a875f
The group name is missing if there is no group backend that can resolve
the UUID. This can e.g. happen if the singleusergroup was used and
single user groups have been added to Gerrit groups, but then the
singleusergroup plugin was uninstalled so that the single user groups
can no longer be resolved.
Change-Id: I1bccec4bb38b55f6ad9b2d2ac83227b379d09071
Signed-off-by: Edwin Kempin <ekempin@google.com>
* stable-2.15:
ChangeIT: Temporarily disable tests related to group matching
Align SSH create-project with REST API
SubmoduleOp: Fix formatting of submodule update commit message
Fix Postgresql JDBC driver leaking memory
Document that the build works with Python 2 or 3
merge_jars.py: Fix for python 3 compatibility
project.py: decode byte output from check_result
license and doc: Add support for python3
Bazel: Make build tool chain python 3 compatible
ExternalIds NoteDb migration: Avoid intermediate migration state
Make PrivateStateChanged and WorkInProgressStateChanged singletons
BatchProgramModule: Bind GitReferenceUpdated.DISABLED
BatchProgramModule: Don't bind event classes to null
Document that Python 2 is required by the build
Make event firing classes singleton
Fix ConcurrentModificationException when posting reviews
Revert partially "Trim multi-line arguments for task name and ssh_log"
BaseCommand: Fix formatting of task description with arguments
Add analytics to the list of plugins
config-plugins: Consistently use "/+doc/" for documentation links
config-plugins: Fix link to ref-protection plugin documentation
config-plugins: Add readonly plugin to plugin list
Add documentation for SshCreateCommandInterceptor
Allow plugins to intercept ssh command creation
GWT/Poly: Default to "Create initial commit" during project creation
Revert "Reduce chance of deadlock in account cache"
commit-msg: Adapt to awk behavior change on Cygwin/MSYS
Expand docs on how to include external dependencies in core plugins
Document how to bundle custom plugins in release.war
Group members can't be added as reviewers if a matched username exists
Set version to 2.13.11
StreamEventsApiListener: Prevent NPE when account is null
Set version to 2.11.11
Replace links to code.google.com/p/gerrit
Update issue tracker URL in documentation
Update issue tracker URL in POM files
Bump jsch to 0.54
Update jsch to 0.1.53
Bump Jsch to 1.52
Change-Id: Icec3dcfe53146da7d66d4d690afdd9e77ee10380
Common support cases for our Gerrit admins stems from users creating
projects without an initial empty commit. The absolute vast majority
of end-users do want an initial commit in their newly created projects,
but sometimes misses to check the "Create initial commit"-checkbox in
the UI. When failing to do so, the situation may be a bit problematic
to remedy for the end user since:
* It is not always clear why they cannot push reviews to their newly
created git.
* It is cumbersome to create an empty root commit for casual git users
* Direct push to refs/heads/* is not always permittable
At our company we have yet to see someone creating an empty commit and
do not want it.
Change-Id: I2462e5fb7dbb68b0816ec25fa0b42ad135a2bb68
Currently we support strict/non-strict label in PostReview,
which is controlled by the 'strictLabels' option.
For strict labels, we require all labels to be within the
user's granted range. Attempting to vote a label value not
granted will fail the entire operation. For non-strict labels,
we squashes the proposed value to the nearest granted value
and the operation will be executed.
This change removes the support for non-strict labels.
Change-Id: Icb9dfafea567e1e9c469811e830e3519b865700f