This change extends the existing cherry-pick endpoints to allow
users to specify the base commit of the cherry-pick destination.
If the base commit represents a visible change revision on the
destination branch, the change status must be either 'New' or
'Merged'.
Alternatively, the base commit can be a merged commit on the
destination branch with no change associated with it.
Change-Id: I6721a2d88f4b73058dc1abf3e85c4184e46088c5
* changes:
Highlight hunks which are due to rebase on PolyGerrit
Copy due_to_rebase to subgroups in gr-diff-processor
Move diff tests from RevisionIT to RevisionDiffIT
Mark hunks which are present due to a rebase when diffing patch sets
The documentation was wrong and not in sync with the output of:
$ ssh ... gerrit review --help
The --json is a boolean, it doesn't accept file name as its value.
Change-Id: Ie0cc1f498dbe31c215f260c80c8e53215f3b1627
So far it only checks that preferred emails are backed by
corresponding external IDs. E.g. change I2b3c5c9d assumes that each
preferred email exists as external ID.
Change-Id: I824caa34545b1ba147fb71ede503104ba1d5481c
Signed-off-by: Edwin Kempin <ekempin@google.com>
The diff between two patch sets contains hunks which weren't
introduced by either patch set if a rebase occurred between those
patch sets. Previous optimizations for this case simply omitted all
files which aren't touched by either of the patch sets.
This change goes one step further: All hunks which can clearly be
identified as being introduced by a rebase are marked. In case of
doubt (e.g. they overlap with a regular hunk), they aren't marked.
To be consistent with the previous behavior, we exclude all files from
the result which only contain hunks due to rebase. In some cases (e.g.
a patch set touches 'fileA' but all identified hunks were introduced
by the rebase), this rule can be stricter than the previously mentioned
(as the previous rule would still show file 'fileA' but we exclude it
now).
Hunks which are introduced by a rebase are identified by computing
the diff between the parents of the two patch sets and transforming
the result to differences in terms of treeA of patch set A and treeB
of patch set B. This follows a suggestion which was posted as a comment
(https://gerrit-review.googlesource.com/c/33091/5//COMMIT_MSG#7) in
change I63d3a21ad4f.
As we always determine which hunks are introduced by a rebase when
two commits are explicitly specified which don't share a common
parent, we will determine those hunks even when we compute the
diff between the parents of the patch sets provided that those
parents fulfill the condition of being separated by a rebase. Those
situations should be rare and hence we refrain from adding
optimizations for this case for the moment.
Bug: Issue 217
Change-Id: If06381d506d360f0e3d24d078dcb54692698e766
By default the first user that logs in to Gerrit automatically becomes
administrator. This is useful to bootstrap the authentication database.
However in automated server setups it should be controlled explicitly
who becomes admin and then it makes sense to disable this functionality.
The default behaviour (make the first user admin) is not changed.
Change-Id: Ic9778824e96ce4f61d974412aaaa6b40e6b465ba
Signed-off-by: Edwin Kempin <ekempin@google.com>
* stable-2.14:
Document how to set default UI
Note on branch-specific labels with custom rules.pl
GWT UI: Allow to set blocking label range rules
Extend LFS plugin servlet so that Git LFS 2.0 Lock API is handled
PolyGerrit: Fix undefined url in gr-dropdown
Change-Id: I01320e404daf1abd052c39321346e2eacff3dd09
Introduce the documentation on how to define the
Gerrit's default UI for users that have no cookies set
or have not clicked the New UI (or OLD UI) on the
bottom link of the page.
Change-Id: If769b85d3ef6947bcb9a7373da8b970d472f700c
Clarify in the documentation that when a project has a custom
rules.pl defined or inherited the branch-specific filtering of
a label has no effect.
Change-Id: I3b5a8e2a17b3f3c615bda1290ce3bfa5b58850bc
Clarify in the documentation that when a project has a custom
rules.pl defined or inherited the branch-specific filtering of
a label has no effect.
Change-Id: I3b5a8e2a17b3f3c615bda1290ce3bfa5b58850bc
This change adds support for a new change identifier in the /changes
REST API endpoint. It follows the discussion on
Idac92e61ee1471b074034eef39901b1b8e961706 and the two recent Gerrit
Hackathons.
The new change identifier serves multiple purposes:
1) Since it contains the project name, we can directly construct the
ChangeApi without a secondary index lookup. This means that we can
still serve requests to some endpoints, even in case of a complete
index failure.
When the project is added in the UI, we will still be able to serve
change pages in case of an index failure. While the triplet also
contains the project, it is unfeasible for the UI since it requires a
branch name (which we don't want to have in the UI URLs) and has the
changeId instead of the change number.
2) Reducing the number of secondary index lookups is a performance gain.
3) The project name being contained in the URL enables load balancers
to shard requests based on the project without a need for an index
lookup (which most load balancers do not support). The sharding
configuration can then be as easy as a regular expression and a
static project-to-machine mapping.
4) This change is also a first step in deprecating the other three
change identifiers and unifying our API access pattern. This will
happen gradually in upcoming changes. Also the UI will be adapted.
This change also adds extensive testing to both the new parsing logic as
well as all change identifiers in both the Java and the REST API.
Change-Id: I7a904fdd001c065af9897d9c08edce1cfbd43a14
This change adds support to set notification options for the existing
cherry-pick change/commit REST endpoints.
Change-Id: I3b419a4d68ea186092163cddd354b5bf4de0daeb
Use an arbitrarily high limit during NoteDbOnlyIT, where we explicitly
want retries to happen, in order to avoid spurious timeouts caused by
scheduling delays on overloaded test machines. For other tests,
LockFailureExceptions generally shouldn't crop up during updates anyway,
and if they do, we would rather the updates time out in finite amount of
time so we can see the resulting stack trace.
Change-Id: I5bad32749b994e6473176cdd45cc80d9d4e195eb
Make the Jetty HTTPD socket timeout (by default 30s) configurable
so to tailor the socket and thread consumption to the needs of setups
with different latencies and bandwidth.
Change-Id: Idaf2a69e44b221f9d422afe56060a4300229c47c
In the current implementation, a change may only be set to private by
its owner. In cases where a user has uploaded a change that should be
private (i.e. they have accidentally included sensitive information),
but the user is not available or not responding to requests to set it
private, the site administrator should be able to set it.
In future we may also want to allow project owners to set other users'
changes to private. This is not done in this commit as it is not yet
clear if the project owner related permission checks are going to be
migrated to the new permission backend.
Change-Id: I48da68e823c4e3fc5f58f21acb4e26d193606978
This change adds a new interface 'NoteDbRewriter', which can be used to
rewrite the NoteDb commit history in BatchUpdate.
By implementing the new interface, this change allows users with
administrate server capability to delete a comment by replacing the
comment's message.
To delete a whole comment, the rewritter is required to update the
commit message, which contains the number of the comments put in by the
original commit. This can be done in later changes when necessary.
Bug: Issue 4445
Change-Id: Icaeb3c24f5dc88f6b44b1297366a692a32676910
This allows users to explain why the private flag on a change was
set/unset.
Since the requests to set/unset the private flags can have a request
body now, POST is more appropriate than PUT. Changing this is okay,
since the support for private flags was not released yet.
Since some proxies prohibit request bodies for DELETE requests offer
deletion of the private flag also as POST request on
/changes/<id>/private.delete.
The setPrivate method in ChangeApi is changed, which is okay since it
wasn't included into any release yet.
The UI doesn't offer to specify a message yet when the private flag is
set/unset but this may be implemented in a follow-up change.
Change-Id: Ib201114ffa397a313bca565d7fb52767b4c9197c
Signed-off-by: Edwin Kempin <ekempin@google.com>
* stable-2.14:
Create group-indexed extension point
Always use SSL implicitly for POP3 and IMAP
InitSshd: Check if the ssh_host file exists with the other keys
Change-Id: I1ad22d5566314865c0c03bcf31f7802b653e82fa
* stable-2.14:
Use 'Merge list' as display name for /MERGE_LIST
DatabasePubKeyAuth: Also look for ecdsa keys and ed25519 keys
SshDaemon: Also look for ecdsa keys and ed25519 keys
InitSshd: Generate ecdsa and ed25519 keys if the host supports them
Speed up reviewer suggestion
Relocate setting page base to app initialization
Allow multiple Servlet filters on Jetty HTTPD
Change-Id: I22fa3777ea8150a89e4c66d5d32535caee1b5a76
PolyGerrit has a hard time showing the diff view for binary files like
images. To get the base, it has to request it separately using the
parent commit SHA1, which is expensive.
This commit adds a 'parent' parameter to GetContent in the same way that
it is done for DownloadContent. This way, PolyGerrit can use the same
endpoint and avoid expensive permission checks since users who can see a
change are also allowed to see the base commit.
Change-Id: Id6b4d0ea994282d9b4942f9ec1a8f4071a1064b1
Enable the ability to specify httpd.filterClass more than
once to have mutiple Servlet filters installed at startup.
Change-Id: I460bb5e56640f55ff7b380072dce6d44353ed3e7
* stable-2.14:
ChangeScreen: Expect that current revision can be null
Update docs for accountPatchReviewDb
Change-Id: I908b92c6d41e01fe5287c42a389888bc6a3de108
* stable-2.13:
ChangeScreen: Expect that current revision can be null
Update docs for accountPatchReviewDb
Change-Id: I2ec42e90430b895ee205fe99a1fbd4e2ec21af8e
This updates the doc for accountPatchReviewDb to mention you have to
use a different db name instead of gerrit's db
Change-Id: I2742bfd6d53c80644e6fdee41c07a28c30d087c9
* changes:
Block submission if work in progress
Add tag for patchsets uploaded with %wip
Ignore notifications for work in progress workflow
Document new endpoints for work in progress workflow
Add API for work in progress workflow
Add REST endpoints for work in progress workflow
Support work in progress and ready options in git push
Add field for wip changes to index and QueryBuilder
Add work in progress property to change