* changes:
Support migrating PrimaryStorage from NoteDb -> ReviewDb
Support read-only lease in NoteDb meta graph
AbstractChangeUpdate: Clarify when notes can be null
ChangeRebuilder: Add method to rebuild NoteDb -> ReviewDb
To support reverse migration from NoteDb -> ReviewDb, we need to do a
similar thing to what we did with NoteDbChangeState, except in this case
NoteDb is the source of truth, so we need to record the lease in NoteDb.
Let a determined caller clear a lease by setting the readOnlyUntil to
the special timestamp of 0. There is no assurance that the caller is the
same one that holds the lease, but this code is going to be used in
exactly one place.
This does pollute the meta graph with implementation details of the
migration, which we didn't really want to do. We can erase our tracks
later by rebuilding the change again once ReviewDb is primary again.
Change-Id: Ia019fb47e1c1edf719354d0da6bbfe22429f3eb1
Reformatting the code with google-java-format tool in change Id5f3c6de9
resulted in wrapped lines being unwrapped to the new 100 columns limit.
In cases where the wrapped line was wrapped on a string concatenation,
the resulting long line now includes redundant concatenations. See the
upstream issue [1] for an example of this.
Squash the redundant concatenations with:
git ls-files | grep java$ | xargs sed -i '' 's/" + "//g'
(note: this also resulted in a couple of unwanted changes; those are
manually undone.)
[1] https://github.com/google/google-java-format/issues/122
Change-Id: I7348413ae460c8c7a0b0c72dab0a1ae7275a2ec3
HLJS emits a syntax class for function parameters which the PolyGerrit
syntax stylesheet would color blue. However, HLJS did not always apply
this class accurately, for example, in the C++ case described in the
linked issue.
Because the class was not very informative anyway, and the HLJS default
stylesheet does not style it either, this change removes it from the
PolyGerrit syntax styles.
Bug: Issue 4975
Change-Id: I26ed0b8f745ac6add994a5d1cfc8eb1303dac8cf
Previously, people using Polygerrit did not realize how to access admin
functionality in GWT. This build out a skeleton menu, and displays the
appropriate menu items based on role. The page itself will still show
the default admin view placeholder.
Bug: Issue 5470
Change-Id: I1266dd8fb70d0afac485f1e547fae85acee7e5aa
When the 'expand_inline_diffs' is set, the arrows to the right of the
files in the file list are hidden. The Total numbers were lined up based
on the assumption that the arrows were there. This change determines
padding based on user preference.
Bug: Issue 5516
Change-Id: I5c178402823a064bddb3c24dedaf4917fe05afed
When a user updates a change that they are not the owner of (for
example, when providing assistance with a new patch set or when updating
the commit message on the owner's behalf) the generated email can give
the impression that the user has created an entirely new change.
With this change, ReplacePatchSet emails check whether the user who
modifies a change differs from the owner of that change. In this case it
appends a note regarding the owner.
For example, the sentence in the replace patch set emails ...
User One has uploaded patch set #123 to this change.
... becomes ...
User One has uploaded patch set #123 to the change originally created
by User Two.
Bug: Issue 4805
Change-Id: Ia9aefaaf6fd3e5f0485675f30e048ac54c94a1b9
Adds a function to compute the number of unresolved comment threads in
a file and add it to the file-list comments label.
Feature: Issue 4879
Change-Id: I52dff194098a681386f275695d5d4a6e463cba0c
Polymer (as well as webcomponents-lite) perform some initialization in
handlers for the `requestAnimationFrame` callback for performance
reasons. The principal drawback of this approach is that pages will not
render in background tabs (such as tabs created by Ctrl+Click-ing a
link) because the rAF system will not offer a frame until the tab has
been foregrounded.
With this change, PolyGerrit pages are rendered in the background by
calling a private function that tweaks the internal state of the Polymer
rendering mechanism to bypass the rAF callback (on the Polymer team's
advice).
Because GR-ROUTER depended on the `webcomponentsready` event, which had
been polyfilled by webcomponents-light inside another rAF callback, it
is refactored to initialize the router inside a Polymer instance method.
Bug: Issue 4334
Change-Id: I8fa43e37199848e053225626406e31613c20deda
This adds a newline char when parsing change messages for inbound
emails and fixes a bug where notifications sent out for these messages
would not contain the change message.
Change-Id: Ifa720236c1ded0207e5f4cf499a0879fa4ccff21
Per
https://www.bis.doc.gov/index.php/forms-documents/encryption/328-flowchart-2/file
open source crypto software can be self-classified as 5D002, and
requires only notification of the U.S. Bureau of Industry and
Security.
This registration has been performed by Google, as of Feb 15, 2017.
This gets rid of the special casing for BouncyCastle, simplifying our
build and deployment process.
Change-Id: I680b0a001e5e2e497ed6e62c90c8b8be30efff48
The Util class will eventually be removed after the project access
RPC is replaced with the REST API.
As a preparatory step, move the constants and messages instances out
of this class into the respective interfaces. This also makes these
implementations consistent with how messages and constants are defined
in other such interfaces.
Change-Id: Ie9fbfb901870d7ce7caad5cbb253194f81632c0f
During init we can't get GerritPersonIdent injected which is why we
created an init person identity. Instead we can just create the real
Gerrit person identity via GerritPersonIdentProvider.
Change-Id: Ic23905657fbf9ced80d37d51726f8aa75e0a2259
Signed-off-by: Edwin Kempin <ekempin@google.com>
The class under test, OutgoingEmailValidator, is in the package:
com.google.gerrit.server.mail.send
Move the test class to the same package.
Change-Id: I2d071a692aaf5c2b2bc1f09dd68e64110a646554
* Update plugins/hooks from branch 'master'
- Refactor to pass injected instances through HookArgs
Instead of injecting the SitePath and GitRepositoryManager in all the
places they're used, inject them only in HookFactory and pass them
around through HookArgs.
Make objects package visible in HookArgs so that they can be accessed
directly rather than through getter methods.
Change-Id: I0cee06e4928748e7dba0315653def894d27244de
MyIdentitiesScreen has been migrated to REST API by [1]. The old RPC
backend will not be used anymore and thus can be removed.
[1] https://gerrit-review.googlesource.com/#/c/95952/
Change-Id: I7d2b255b1ea7df455656cb8a4410cb0f279416d2
This reverts commit 39777363a63c603cfa68ca52d2f3c99eb04f2f46.
Reason for revert: the frontend part of this change doesn't work.
Change-Id: I53138e939a1b98578787457e48743fdc8abf658c
Get a hasParent attribute from the related changes endpoint, determining
if a change has a parent change that is not the tip of the branch.
This will be used by the rebase dialog to display tailored options
that make rebasing more intuitive. UI changes to follow.
This change also updates rebaseOnCurrent from being a property of
gr-change-view to getting added in the rest api interface as a property
of the rebase action. This is why the property is removed from all
views until the reply dialog, where it is passed as a parameter.
Bug: Issue 5447
Change-Id: If31e4c42d8e82f00fba9fa98c28371046299eec4
If a change is pushed that depends on an open change and both changes
are targeted to the same destination branch, we don't want to recreate
the base change for the same branch if the
CreateNewChangeForAllNotInTarget project option is set to true. We also
don't want to do any validation of the base change as it is not touched
by the upload of a successor change.
At the moment trying to push a change that depends on an open change of
another user fails with "invalid committer" if the uploading user
doesn't have the Forge Committer access right. This is because
CreateNewChangeForAllNotInTarget wrongly attempts to create a new change
for the base change, and hence does validation for the commit of the
base change. The error message for the base change is:
invalid committer
ERROR: In commit 683c42e4ba60ffa68c820de9064b6c36238600c4
ERROR: committer email address other.user@example.com
ERROR: does not match your user account.
ERROR:
ERROR: The following addresses are currently registered:
ERROR: user@example.com
ERROR:
ERROR: To register an email address, please visit:
ERROR: http://localhost:0/#/settings/contact
This is confusing to the user who only uploaded a successor change but
didn't touch the base change.
Bug: Issue 5478
Change-Id: I04e25b5eb09e0c9540652c93eb1408d2fab39f6b
Signed-off-by: Edwin Kempin <ekempin@google.com>