* stable-2.8:
Remove 'including replication' from the show-queue command description
Add description for commands disabled in slave mode
Remove unused import of Nio2ServiceFactory
Replication is handled by the replication plugin. The plugin might not
be installed, so including this in the description could be misleading.
Change-Id: If741d932dbabc5425d8a703e8ff12eb0bfd7e321
Running the `gerrit` ssh command without arguments to a server that
is running in slave mode results in a list of available commands
being shown.
In this list, the commands that are disabled in slave mode do not
have any description.
Add a description mentioning that the command is disabled due to
the server running in slave mode.
Bug: Issue 2424
Change-Id: Iffc43a921e70a9ed9008a62dcec12b80683b71b3
Running the `gerrit` command without any arguments over ssh results
in a list of available commands being shown.
When running the Gerrit server in slave mode, this list includes the
`approve` command which was deprected and then removed, and the
`replicate` command which is now handled by the replication plugin.
Remove these commands from the list.
Change-Id: Ide32dde34dcb1bc59a05001c43d2ce423d193ba0
Mina SSHD nio2 backend is currently broken. Drop it from the configuration
and code. It appears that the bug is already fixed upstream [1]. Waiting
for the next SSHD release 0.10 for upgrade before we can enable it again.
[1] https://issues.apache.org/jira/browse/SSHD-252
Reported-By: Will DeBerry <willdeberry@gmail.com>
Change-Id: I6dbf0f7a1165b25304ef07f2792db67828dca10c
Encapsulate the current state of the migration in a NotesMigration
class. For each database table (or broader group of functionality)
that we migrate to notedb, configure a boolean indicating whether that
data should be read from notes, defaulting to false.
Unlike reads, NotesMigration contains just a single boolean
indicating that data should be written. We don't attempt to write
just some types of data; as the migration continues we will just
rewrite history.
Since most existing reads of the PatchSetApprovals table have been
migrated to ApprovalsUtil, most implementation changes happen there.
There are a few other implementations scattered around, and some that
will require a bit more work (e.g. stamping normalized approvals at
submit time).
Change-Id: I5676267d4de607c385e8c9917a89333863b9c9e7
In a notedb world we would like to slurp all information about a
change from the git-based storage as soon as a ChangeResource is
constructed, which will involve extra work in this parse, analogous to
how parse currently validates the change permissions.
Preserve the ability to pass in a particular ChangeControl object,
since various callers have specific requirements like reusing the
control elsewhere, or using a control for a different user.
Change-Id: Ia7c9761ef92bb8f05ae3323210babaa02b0dbe6f
We currently support two styles of parsing, Label-Value and
Label=Value. Consolidate these into a single LabelVote class.
(Unfortunately for backwards-compatibility reasons we can't just
eliminate Label=Value in ReviewCommand.)
Change-Id: I9e5255b184d786226e6b11fe059001608c00673d
This can happens if you have a long queue and the state of
a task (DONE, CANCELLED, RUNNING, READY, SLEEPING, OTHER)
changes while the sorting is ongoing. The reason this
generates an error is because the Task State defines
the tasks’ place in the queue.
If Task state changes while the sorting of the queue is
ongoing the Comparator violates its contract of:
X<Y, Y<Z => X<Z
and throws:
IllegalArgumentException: Comparison mehtod violates its
general contract!
Fixed this bug by saving a snapshot of the state and delay
of the tasks in a wrapper.
* Introduced interface TaskInfo that is implemented by
QueueTaskInfo
* Added getTaskInfos method in WorkQueue decoupling it from
ShowQueue implementation by Interface and factory.
Signed-off-by: Gustaf Lundh <gustaf.lundh@sonymobile.com>
Change-Id: Iea17046aea1b8c6119cfc663438e17f663e05b22
The idea of 'standalone JavaScript plugins' came during the 'JavaScript
plugins' talk at the Gerrit User Summit.
The main concept is to automatically install and expose all *.js files
that are in Gerrit's plugins/ directory. This should lower the entry
point barrier for JS developers.
There is one limitation of such plugins: they cannot contribute
additional resources. When such are required, the implementer should
inline them in JS code or use the gerrit-plugin-js-archetype.
Change-Id: Ibad8c3938c0855fcabe6937fd8b4d508a9a2eac3
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
Checked type inference has changed slightly in Java 7, so many of the
suppressions are no longer necessary.
Change-Id: I73585e888b8204429ea67c8f4822d81d4dad8c46
The review command allows the patch set to be specified by the commit's
sha1 revision. It is possible that the revision does not identify a
unique change if the same sha1 has been pushed to more than one project
or to more than one branch of the same project. This causes the review
to fail with an error.
The results can be narrowed down to a specific project by using the
--project option, but it will still fail if the sha1 is on more than
one branch in the same project.
Add a new --branch option that allows to narrow down the results by
branch.
Bug: Issue 1752
Change-Id: I555dc9de1b092e7562f5d99c4c60df589935a47f
GWT only needs the rebind code for CSS and ServerLinker to be
precompiled as bytecode. Save build time by passing no source
files to the java_library() used by gwt_module().
For a full draft build of ui_safari this cuts the refresh time
down from 32.015s to 26.158s on my MacBook. Saving 6s on each
UI reload adds up during development.
The common annotations need to be provided as bytecode, avoiding
spurious warnings from GWT when there is a Java syntax error.
Change-Id: I37826498650c65c05303e7d4d1177d05781c56f6
Most existing sites are safe. The implementating method only scans
the array and does not retain it beyond the method invocation. In the
questionable cases use ImmutableList instead of a varargs array.
Change-Id: Ic2d0c1c1801a68ec58b642552e97e2d193b40a98
* stable-2.8:
Update the 2.8 release notes with recently merged changes
Update documentation of the `review` command
Fixed several spelling mistakes
Remove deprecated approve SSH alias
Conflicts:
Documentation/cmd-index.txt
Change-Id: Ieb4708793b0e323dcb2a68a31e59035519ec4af9
{@code foo} is shorter and easier to read and write than
<code>foo</code>, which is why it was introduced years ago in the
javadoc processor. Make consistent use of it throughout the
documentation comments.
Change-Id: I59d428cb6c5015453629398b0697891b83c8e91d
This allows to control to whom to send email notifications to after
the review is stored.
Change-Id: Ifbef1419e59a8cb5750cb0e48f47b6652aae9e36
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
At the moment log4j configuration is a bit inconsistent: it is
possible to configure error_log and gc_log using file provided
with log4j.configuration system property, however httpd_log and
sshd_log configuration is hard-coded in corresponding classes
(HttpLog and SshLog).
Make logs configuration more consistent by using log4j for all
logs. If log4j.configuration variable is not set, log behavior
remains intact and code-level log configuration will be used.
In case of log4.configuration points to log4j.properties file the
hard-coded configuration will be ommited and log4j.properties will
be used instead.
In addition shouldConfigureLogSystem() call moved from ErrorLogFile
to LogUtil in com.google.gerrit.util package and removed deprecated
reference to log4j LogManager.DEFAULT_CONFIGURATION_KEY so that
gerrit common does not require log4j.
Two inner MyLayout classes (one from SshLog and one from HttpLog)
have been extracted to separate files and renamed accordingly to
enable to use them from log4j.properties file if required. At the
moment those are extracted as is - refactoring will follow.
Change-Id: Icb1a3787b98392a9df9bb2afa4dc857f8cfada3a
Signed-off-by: Eryk Szymanski <eryksz@gmail.com>
New version has features which be useful for Gerrit core and plugins:
* new hidden attribute, specifying to hide it in help message
* new depends attribute, specifying the dependent option(s)
* multiValued attribute was removed
Change-Id: Ic7e9f37231cb83940db50fe3b9efe8ad972108cf