| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* stable-2.15:
Bazel: Automatically fix lint errors with buildifier 0.20.0
Bazel: Fix more buildifier warnings
Bazel: Automatically fix lint errors with buildifier 0.20.0
Fix typo in documentation of edit preferences
Bazel: Automatically fix lint errors with buildifier
Change-Id: I3400928e4dca65264715dca3c29729237934f042
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* stable-2.14:
Bazel: Fix more buildifier warnings
Bazel: Automatically fix lint errors with buildifier 0.20.0
Bazel: Automatically fix lint errors with buildifier
Change-Id: I02ba30185683a54dca09e6e200b90fe0e86e1f83
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In recent buildifier versions, lint errors can be fixed automatically:
$ find . \( -name BUILD -o -name "*.bzl" \) -print \
| xargs buildifier --lint=fix
This commit was created with Buildifier version 0.19.2:
$ buildifier --version
buildifier version: 0.19.2
buildifier scm revision: d39e4d5c25111527369142f16cdb49aa67707313
Change-Id: I1f06cd4596e794981ccc2d9fc2d1da9b17f3973a
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With the introduction of default methods in Java 8, Java finally grew a
List#sort method that can be used in place of the static
Collections#sort. Convert simple in-place sorts that need to be in-place
sorts to use this method where possible.
During the course of this change, it became obvious that many instances
of sort were just sorting a newly-created ArrayList in place. These can
be replaced with more idiomatic Stream constructions, sometimes even
eliminating a loop to populate the list.
One difference between List#sort and Collections#sort is there is no
List#sort() with no arguments; callers must always pass either
naturalOrder() or a null comparators. In this change, there were so few
remaining instances of sorting by natural order that typing
naturalOrder() didn't seem too repetitious, and it is quite readable.
Change-Id: I4d89421a72127e9a36cbd32aeac425c0471a1b3f
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Where a comparator is obviously comparing one or more derived keys,
either manually or with ComparisonChain, replace with the equivalent
comparing() call. Not all comparators are simple to translate in this
way, such as ChunkManager#getDiffChunkComparator. Even though these
cases could be improved, or, quite likely, they contain bugs, that work
is left for a future change.
In the common case of creating a comparator to pass to Collections#sort
to sort a newly-created ArrayList, replace these with equivalent stream
expressions. Again, not all cases of Collections#sort are simple enough
to tackle here.
In some of these cases, we could probably further alter the types to
more aggressively use immutable types. Generally speaking, that would
introduce ripple effects which would make this change less focused and
difficult to review. Don't do that, in order to limit the cleanup here.
Change-Id: I098d3820927367ee98c96698481cb0edcceb3d64
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | | |
Change-Id: I048d005a0f75b0803be14f2128af682f0f834f8d
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* stable-2.15:
ChangeQueryBuilder: Remove unused Config parameter from constructor
Release 2.15-rc3
Schema_159: Don't set closed changes as WIP/private
Change default of migrating draft changes to WIP, not private
Remove handling of change.allowDrafts
Remove documentation on change.allowDrafts
Change-Id: I841e44ca792371d89b5f646df8f69739ec1284be
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This setting applied to the Draft Workflow (draft patch sets), removed
in 2.15 (not to be confused with Draft Comments, which still exist).
Change-Id: Ibc413d7df2e8b28c30f29324c6fb39ab2ca0f007
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We would like to move the Account class out of the reviewdb.client
package and then the GWT UI can no longer use it.
Change-Id: Ic3cc3603ca4924ba8293d8d858a786d44f433868
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
| | |
| | |
| | |
| | | |
Change-Id: I5b64fed8bbff59b13247200ff0a3553509018281
|
| | |
| | |
| | |
| | | |
Change-Id: I8567aafd278e1711c98c12e328d3fd03be9d347a
|
|/ /
| |
| |
| | |
Change-Id: I7c3bd0a514dab68bf7875104ea3ac8e726624480
|
|\|
| |
| |
| |
| |
| |
| | |
* stable-2.14:
RelativeDateFormatter: Simplify rounding of years and months
Change-Id: I892c18b9d1c75678586ecf757187eae64ce01cd2
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of adjusting the years and months values after first
incorrectly calculating them, fix the calculation.
Based on the implementation proposed in [1]
[1] https://git.eclipse.org/r/#/c/109895/
Also-by: Michael Keppler <Michael.Keppler@gmx.de>
Change-Id: I9a48183c9a16fda2ea0d2521a7cd0b1a5e5f2f45
|
|\|
| |
| |
| |
| |
| |
| | |
* stable-2.14:
RelativeDateFormatter: Fix bad rounding of "1 year 12 months" to "2 year"
Change-Id: I9a59d799f4b3858dace45ac82aa03b3e318177f7
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change I8b1af0e72 fixed rounding of dates, but it only works properly
when the year is already greater than 1.
In the case "1 year 12 months", the year is correctly incremented to 2,
but the label is not adjusted, resulting in "2 year".
This was not noticed during review of I8b1af0e72 because the test that
was added only tests for "4 years 12 months" being rounded to "5 years".
Add an adjustment of the label when the year count is incremented, and
add a test for "1 year 12 months" being correctly rounded to "2 years".
The test is taken from [1] on the jgit project.
[1] https://git.eclipse.org/r/#/c/109895/
Bug: Issue 7357
Change-Id: I9729e6ad82ad31f36d889f59a6663c7c05495b73
|
|\|
| |
| |
| |
| |
| |
| |
| | |
* stable-2.14:
Fix bad rounding of relative dates like '1 year, 12 months ago'
Fix test of RelativeDateFormatter
Change-Id: I74224dd813dfcf71da98befd7ccf36973f8a6206
|
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of '1 year, 12 months ago' it should say '2 years ago'.
Bug: Issue 7357
Change-Id: I8b1af0e72e295b667ade7f6405378222f127644b
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
RelativeDateFormatterTest was testing the relative date formatter from
jgit (org.eclipse.jgit.util.RelativeDateFormatter) instead of the
relative date formatter that we use on the client
(com.google.gerrit.client.RelativeDateFormatter).
When testing com.google.gerrit.client.RelativeDateFormatter we can't
access the GWT constants and messages (since they are not available
outside the GWT context). Hence these constants and messages are
abstracted out.
Change-Id: Ia16f355ba3d646b3b7c696bdc58ea974334ef6d5
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This suppression is not needed since we are ignoring warnings about
boxing in the compiler settings.
Having this suppression causes an "info" warning in Eclipse Oxygen.
Change-Id: Iff924a45f7d3d3e7f5a2c7a7fb95f82b1b21233d
(cherry picked from commit 56367dd838a7e7b78d903060cc8c12258c8ef021)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the Mute/Unmute functionality, it is replaced by the new
MarkAsReviewed/MarkAsUnreviewed REST endpoints (added by predecessor
change).
A schema migration takes care to rename existing mute labels. Since
the star labels are also stored in the change index the affected
changes must be reindexed. Since we can't reindex changes from a
schema migration a new change schema version is added which enforces a
reindex of all changes on upgrade to the new index version (either by
online or offline reindex).
The mute functionality was added by change I83085033f which is not
part of any release yet. Hence we can still change the API for this
without breaking backwards compatibility.
Since the 'mute' namespace is now free again we may use this name
later to implement functionality which is similar to Gmail's mute.
E.g. remove the change from the dashboard until a new patch is
uploaded.
The muted() method is removed from the extension API since the
information whether a change is reviewed or not is already provided as
part of ChangeInfo (see "reviewed" field). This method was anyway bad
since this functionality didn't exist as REST endpoint and the
extension API is normally only a wrapper around the REST API.
The 'mute' field from ChangeInfo is removed since it wasn't used on
client-side. The client rather relied on the "reviewed" field to
highlight changes in dashboards.
Bug: Issue 7237
Change-Id: Ia21e6031908dd0c722f3839ab186724043b460d3
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Somewhat surprisingly, this was never directly exposed by the REST API.
We already look up the whole PatchSetApproval record corresponding to
submission in order to set `submitted`, so it's trivial to add the
account info as well.
Change-Id: I9bb9cb2c0e85f26548fc94154dd2e02fb4b9537b
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This suppression is not needed since we are ignoring warnings about
boxing in the compiler settings.
Having this suppression causes an "info" warning in Eclipse Oxygen.
Change-Id: Iff924a45f7d3d3e7f5a2c7a7fb95f82b1b21233d
|
| |
| |
| |
| | |
Change-Id: I986a5507aa26ceb28305a7b08991e85238bde0e3
|
| |
| |
| |
| | |
Change-Id: Ibf6c61d8c34ee790ca7ed29a0fad0b5e81910f09
|
| |
| |
| |
| | |
Change-Id: I556554612ebcb405cc737a7f10c9e384600d9ba3
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the "mute/<patchset_id>"-star is set by a user, and <patchset_id>
matches the current patch set, the change is always reported as "reviewed"
in the ChangeInfo.
This allows users to "de-highlight" changes in a dashboard until a new
patchset is uploaded.
The ChangeInfo muted-field will show if the change is currently in a
mute-state.
Change-Id: I83085033ff99d7b0ce1fe834fabfad5956db90ae
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* stable-2.14:
Enable OAuth token setting when gitBasicAuthPolicy equals OAUTH
Enable HTTP password setting based upon gitBasicAuthPolicy
Fix file_name column size in H2AccountPatchReviewStore
GET files?reviewed: Don't fire N+1 selects for N patch sets
Use lower case table/column/constraint names in H2AccountPatchReviewStore
Fix clear methods in H2AccountPatchReviewStore
JestClientBuilder: Format with google-java-format
ES: Extract Jest client builder into separate class
Remove unused import and apply formatting in AbstractElasticIndex
Fix: Default values for Elastic index.* config values
Change-Id: I9e4ff0bd290df5b65ced77c541dec3b2b42a714a
|
| |
| |
| |
| | |
Change-Id: I7a03cad1f0ebc6c69eca717b0606325df0c946a2
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* stable-2.14:
PluginLoader: Remove stale plugin files from /tmp on startup
Format Java files with google-java-format
Update blame-cache to 0.2-1
Set version to 2.13.8
Upgrade JGit to 4.5.2.201704071617-r
Change-Id: Ia27737010984ba58ff74c844aa252d9b7adffbad
|
| |
| |
| |
| | |
Change-Id: I6fbea77754ba61cb30e53037210afa3756268ea3
|
|\|
| |
| |
| |
| |
| |
| |
| | |
* stable-2.14:
Leave assignee feature always enabled
Hide assignee by default in Gerrit changes table
Change-Id: I7bc3b19ea72affe8417928e2ffed08de8d6e6dfb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The assignee feature cannot be disabled and thus does not make
so much sense to just show and hide some parts of it here and there
on the Gerrit UX.
Leave only the possibility to enable/disable the display of
the assignee field as column in the changes table.
Change-Id: Icbfb93a49f29b2fde60b92b448862216861108d1
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Keep backward-compatible behaviour for users coming
from Gerrit < 2.14 and not interested in the assignee
workflow.
The assignee feature will still be accessible through a second
configuration setting (showAssigneeSuggestOracle) that controls
the ability to suggest searching of the changes by assignee.
Typically people and organisations that want to use the
feature massively, will then enable it in the gerrit.config
to be more prevalent on the changes table.
When both showAssignee and showAssigneeSuggestOracle are
set to false, the feature is not accessible anymore because
you cannot neither see nor search for changes by assignee.
Change-Id: Ie826c126b5508c9013ee4f802f6bcfaff95cef76
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Private changes are only visible to owner, reviewers and users with the
configured permission. This lets users stage changes without
advertising their change, and conduct sensitive reviews (eg. security)
mong a small group.
- Add Private field to change in ReviewDb
- Check visibility for private changes
- Add permission that allows users to see all private changes
- Add Private Footer to NoteDb
- Add field for private changes to index and QueryBuilder
- Add REST endpoints to Mark/Unmark private change
- VisibleRefsFilter filters private changes
- GWT UI: Mark/Unmark change as private and show private label
- GWT UI: Show 'status (Private)' in ChangeTable.
- Support to control privacy of a change on push
- Add tests for reviewer visibility and new permission
- Add tests for query by private
- Add tests for advertised references
- Add user documentation in intro-user
To push a private change or to turn a change private on push the
'private' option can be specified:
git push host HEAD:refs/for/master%private
Removing the privacy flag should not happen accidentally, but should be
a very explicit action. This is why omitting the 'private' option when
pushing updates to a private change doesn't remove the privacy flag on
the change. To remove the privacy flag from a change on push the
'remove-private' option can be used:
git push host HEAD:refs/for/master%remove-private
Change-Id: Ib2b26ea19c0286cff9c05754b0875f61e5e9fceb
Signed-off-by: Edwin Kempin <ekempin@google.com>
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Patrick Hiesel <hiesel@google.com>
Signed-off-by: Changcheng Xiao <xchangcheng@google.com>
Signed-off-by: Alice Kober-Sotzek <aliceks@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The JavaScript exception is:
SEVERE: (TypeError) : Cannot read property 'iterator' of null
Class$S170: (TypeError) : Cannot read property 'iterator' of null
at Unknown.$contributorAgreements(gerrit_ui-4.js)
at Unknown.onLoad_19(gerrit_ui-4.js)
at Unknown.onAttach_0(gerrit_ui-0.js)
at Unknown.setParent(gerrit_ui-0.js)
...
Change-Id: I9de8ed23fbccf8987c871f36509f6f203a0ae73a
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
|
|
|
|
|
|
|
|
| |
This change adds all required frontend code for both GWT UI and
Polygerrit as well as docs for the user preferenced introduced by
Change I190644732.
Feature: Issue 5349
Change-Id: I94353380fbd5208cebb7fe8946fb4c4100c8d054
|
|
|
|
| |
Change-Id: I45c60597e636918eaecfa57bc4c9be11bf2110bf
|
|
|
|
|
|
|
|
| |
This reverts commit 15615078df91a5c8c9624467bf1542c9b6f13f06. This
commit breakes the ReviewerSuggestOracle. A new change will create
to fix the PathSuggestOracle.
Change-Id: I330de9d63f5fbe625cc6d552605c64616bae5f63
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- How to reproduce the bug?
In ChangeScreen, click 'Edit', then 'Add...'. Type in some text, you
will get some path suggestions. Delete all the text you've typed in.
There will be no suggestion any more until the page is reloaded.
- Why does this happen?
The UI will continue create new query when the text box is focused
and the 'query' is null in RemoteSuggestOracle. When the text box is
cleared, it will result in a NullPointerException in
RESTApi.addParameter(String, String) when it calls
URL.encodeQueryString as the request.getQuery() is null. Once this
exception happens, onSuggestionReady will not be called and 'query'
field in RemoteSuggestOracle will not be reset to null. That's why
the UI will not try new Request until the page is reloaded.
This problem may be related to GWT 2.8 upgrade. It started behaving
differently after the upgrade. However, I haven't noticed this
problem for reviewers suggestion.
- Solution
Set the query to be empty when request.getQuery() is null.
Bug: Issue 5365
Change-Id: Ia0878b67aebde854012e3cacec51d922a9f32919
|
|
|
|
|
|
|
|
| |
This reverts commit 39777363a63c603cfa68ca52d2f3c99eb04f2f46.
Reason for revert: the frontend part of this change doesn't work.
Change-Id: I53138e939a1b98578787457e48743fdc8abf658c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a user preference such that we only send plaintext emails to
this user. It also adds docs and tests.
For the user, this comes at the cost of not being in the same email
thread as the users who receive HTML emails. We decided to send out
plaintext emails on a one-by-one basis instead of making one thread (as
we do with HTML) as this would just create more confusion.
When admins enable inbound email for Gerrit, the aforementioned caveat
isn't a problem anymore as users would email Gerrit anyway instead of
using a notification email as messaging thread.
Change-Id: I3d0fc920c9d81e1a7b707ae5f3f4600a62b8a93b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having a standard tool for formatting saves reviewers' valuable time.
google-java-format is Google's standard formatter and is somewhat
inspired by gofmt[1]. This commit formats everything using
google-java-format version 1.2.
The downside of this one-off formatting is breaking blame. This can be
somewhat hacked around with a tool like git-hyper-blame[2], but it's
definitely not optimal until/unless this kind of feature makes its way
to git core.
Not in this change:
* Tool support, e.g. Eclipse. The command must be run manually [3].
* Documentation of best practice, e.g. new 100-column default.
[1] https://talks.golang.org/2015/gofmt-en.slide#3
[2] https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/git-hyper-blame.html
[3] git ls-files | grep java$ | xargs google-java-format -i
Change-Id: Id5f3c6de95ce0b68b41f0a478b5c99a93675aaa3
Signed-off-by: David Pursehouse <dpursehouse@collab.net>
|
|
|
|
|
| |
Bug: Issue 5302
Change-Id: I6e860446ef30ff0ad1c7c49fc0e39d39d921820b
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* submodules:
* Update plugins/replication from branch 'master'
- Remove test prefix from test methods in replication plugin
We previously used 'test' to prefix tests but have decided to stop this.
This change removes the prefix from all test code.
Change-Id: I42e6191ece7872f4647e425e3ca0acf8c6452412
|
| |
| |
| |
| |
| |
| |
| | |
We previously used 'test' to prefix tests but have decided to stop this.
This change removes the prefix from all test code.
Change-Id: I229a36751adc6a87fbae8d6f373671e141529496
|
|/
|
|
|
|
|
|
|
|
|
| |
Reformat the Bazel build files with the buildifier tool [1].
The style is different for Bazel files. Most notably, indentation level
is 4 spaces instead of 2, and " is used instead of '.
[1] https://github.com/bazelbuild/buildifier
Change-Id: I95c0c6f11b6d76572797853b4ebb5cee5ebd3c98
|