Clean up remaining command reference files

Change-Id: I96c2d95a22c3b0e9629471ea994e25b72349fe4c
This commit is contained in:
David Shevitz 2018-09-27 10:55:35 -07:00 committed by David Pursehouse
parent 76b78009a2
commit c47f23698a
22 changed files with 159 additions and 162 deletions

View File

@ -46,29 +46,25 @@ This command is intended to be used in scripts.
Install a plugin from an absolute file path on the server's host:
----
ssh -p 29418 localhost gerrit plugin install -n name.jar \
$(pwd)/my-plugin.jar
ssh -p 29418 localhost gerrit plugin install -n name.jar $(pwd)/my-plugin.jar
----
Install a WebUI plugin from an absolute file path on the server's host:
----
ssh -p 29418 localhost gerrit plugin install -n name.js \
$(pwd)/my-webui-plugin.js
ssh -p 29418 localhost gerrit plugin install -n name.js $(pwd)/my-webui-plugin.js
----
Install a plugin from an HTTP site:
----
ssh -p 29418 localhost gerrit plugin install -n name.jar \
http://build-server/output/our-plugin
ssh -p 29418 localhost gerrit plugin install -n name.jar http://build-server/output/our-plugin
----
Install a plugin from piped input:
----
ssh -p 29418 localhost gerrit plugin install -n name.jar \
- <target/name-0.1.jar
ssh -p 29418 localhost gerrit plugin install -n name.jar - <target/name-0.1.jar
----
GERRIT

View File

@ -36,7 +36,7 @@ This command is intended to be used in scripts.
Reload a plugin:
----
ssh -p 29418 localhost gerrit plugin reload my-plugin
ssh -p 29418 localhost gerrit plugin reload my-plugin
----
GERRIT

View File

@ -33,7 +33,7 @@ This command is intended to be used in scripts.
Disable a plugin:
----
ssh -p 29418 localhost gerrit plugin remove my-plugin
ssh -p 29418 localhost gerrit plugin remove my-plugin
----
GERRIT

View File

@ -117,18 +117,18 @@ This command is intended to be used in scripts.
Find the 2 most recent open changes in the tools/gerrit project:
----
$ ssh -p 29418 review.example.com gerrit query --format=JSON status:open project:tools/gerrit limit:2
{"project":"tools/gerrit", ...}
{"project":"tools/gerrit", ...}
{"type":"stats","rowCount":2,"runningTimeMilliseconds:15}
$ ssh -p 29418 review.example.com gerrit query --format=JSON status:open project:tools/gerrit limit:2
{"project":"tools/gerrit", ...}
{"project":"tools/gerrit", ...}
{"type":"stats","rowCount":2,"runningTimeMilliseconds:15}
----
Skip number of changes:
----
$ ssh -p 29418 review.example.com gerrit query --format=JSON --start 42 status:open project:tools/gerrit limit:2
{"project":"tools/gerrit", ...}
{"project":"tools/gerrit", ...}
{"type":"stats","rowCount":1,"runningTimeMilliseconds:15}
$ ssh -p 29418 review.example.com gerrit query --format=JSON --start 42 status:open project:tools/gerrit limit:2
{"project":"tools/gerrit", ...}
{"project":"tools/gerrit", ...}
{"type":"stats","rowCount":1,"runningTimeMilliseconds:15}
----

View File

@ -1,7 +1,7 @@
= git-receive-pack
== NAME
git-receive-pack - Receive what is pushed into the repository
git-receive-pack - Receive what is pushed into the repository.
== SYNOPSIS
[verse]
@ -43,36 +43,36 @@ Any user who has SSH access to Gerrit.
Send a review for a change on the master branch to charlie@example.com:
----
git push ssh://review.example.com:29418/project HEAD:refs/for/master%r=charlie@example.com
git push ssh://review.example.com:29418/project HEAD:refs/for/master%r=charlie@example.com
----
Send reviews, but tagging them with the topic name 'bug42':
----
git push ssh://review.example.com:29418/project HEAD:refs/for/master%r=charlie@example.com,topic=bug42
git push ssh://review.example.com:29418/project HEAD:refs/for/master%r=charlie@example.com,topic=bug42
----
Also CC two other parties:
----
git push ssh://review.example.com:29418/project HEAD:refs/for/master%r=charlie@example.com,cc=alice@example.com,cc=bob@example.com
git push ssh://review.example.com:29418/project HEAD:refs/for/master%r=charlie@example.com,cc=alice@example.com,cc=bob@example.com
----
Configure a push macro to perform the last action:
----
git config remote.charlie.url ssh://review.example.com:29418/project
git config remote.charlie.push HEAD:refs/for/master%r=charlie@example.com,cc=alice@example.com,cc=bob@example.com
git config remote.charlie.url ssh://review.example.com:29418/project
git config remote.charlie.push HEAD:refs/for/master%r=charlie@example.com,cc=alice@example.com,cc=bob@example.com
----
afterwards `.git/config` contains the following:
----
[remote "charlie"]
url = ssh://review.example.com:29418/project
push = HEAD:refs/for/master%r=charlie@example.com,cc=alice@example.com,cc=bob@example.com
url = ssh://review.example.com:29418/project
push = HEAD:refs/for/master%r=charlie@example.com,cc=alice@example.com,cc=bob@example.com
----
and now sending a new change for review to charlie, CC'ing both
alice and bob is much easier:
----
git push charlie
git push charlie
----
== SEE ALSO

View File

@ -33,7 +33,7 @@ This command is intended to be used in scripts.
Reload the gerrit configuration:
----
ssh -p 29418 localhost gerrit reload-config
ssh -p 29418 localhost gerrit reload-config
----
GERRIT

View File

@ -32,7 +32,7 @@ This command is intended to be used in scripts.
Rename the group "MyGroup" to "MyCommitters".
----
$ ssh -p 29418 user@review.example.com gerrit rename-group MyGroup MyCommitters
$ ssh -p 29418 user@review.example.com gerrit rename-group MyGroup MyCommitters
----
GERRIT

View File

@ -1,7 +1,7 @@
= gerrit review
== NAME
gerrit review - Apply reviews to one or more patch sets
gerrit review - Apply reviews to one or more patch sets.
== SYNOPSIS
[verse]
@ -144,35 +144,35 @@ This command is intended to be used in scripts.
Approve the change with commit c0ff33 as "Verified +1"
----
$ ssh -p 29418 review.example.com gerrit review --verified +1 c0ff33
$ ssh -p 29418 review.example.com gerrit review --verified +1 c0ff33
----
Vote on the project specific label "mylabel":
----
$ ssh -p 29418 review.example.com gerrit review --label mylabel=+1 c0ff33
$ ssh -p 29418 review.example.com gerrit review --label mylabel=+1 c0ff33
----
Append the message "Build Successful". Notice two levels of quoting is
required, one for the local shell, and another for the argument parser
inside the Gerrit server:
----
$ ssh -p 29418 review.example.com gerrit review -m '"Build Successful"' c0ff33
$ ssh -p 29418 review.example.com gerrit review -m '"Build Successful"' c0ff33
----
Mark the unmerged commits both "Verified +1" and "Code-Review +2" and
submit them for merging:
----
$ ssh -p 29418 review.example.com gerrit review \
--verified +1 \
--code-review +2 \
--submit \
--project this/project \
$(git rev-list origin/master..HEAD)
$ ssh -p 29418 review.example.com gerrit review \
--verified +1 \
--code-review +2 \
--submit \
--project this/project \
$(git rev-list origin/master..HEAD)
----
Abandon an active change:
----
$ ssh -p 29418 review.example.com gerrit review --abandon c0ff33
$ ssh -p 29418 review.example.com gerrit review --abandon c0ff33
----
== SEE ALSO

View File

@ -110,7 +110,7 @@ This most likely requires double quoting the value, for example
Add an email and SSH key to `watcher`'s account:
----
$ cat ~/.ssh/id_watcher.pub | ssh -p 29418 review.example.com gerrit set-account --add-ssh-key - --add-email mail@example.com watcher
$ cat ~/.ssh/id_watcher.pub | ssh -p 29418 review.example.com gerrit set-account --add-ssh-key - --add-email mail@example.com watcher
----
GERRIT

View File

@ -35,7 +35,7 @@ This command is intended to be used in scripts.
Change HEAD of project `example` to `stable-2.11` branch:
----
$ ssh -p 29418 review.example.com gerrit set-head example --new-head stable-2.11
$ ssh -p 29418 review.example.com gerrit set-head example --new-head stable-2.11
----
GERRIT

View File

@ -1,7 +1,7 @@
= gerrit set-members
== NAME
gerrit set-members - Set group members
gerrit set-members - Set group members.
== SYNOPSIS
[verse]
@ -59,16 +59,16 @@ This command is intended to be used in scripts.
Add alice and bob, but remove eve from the groups my-committers and
my-verifiers.
----
$ ssh -p 29418 review.example.com gerrit set-members \
-a alice@example.com -a bob@example.com \
-r eve@example.com my-committers my-verifiers
$ ssh -p 29418 review.example.com gerrit set-members \
-a alice@example.com -a bob@example.com \
-r eve@example.com my-committers my-verifiers
----
Include the group my-friends into the group my-committers, but
exclude the included group my-testers from the group my-committers.
----
$ ssh -p 29418 review.example.com gerrit set-members \
-i my-friends -e my-testers my-committers
$ ssh -p 29418 review.example.com gerrit set-members \
-i my-friends -e my-testers my-committers
----
GERRIT

View File

@ -51,14 +51,14 @@ This command is intended to be used in scripts.
Configure `kernel/omap` to inherit permissions from `kernel/common`:
----
$ ssh -p 29418 review.example.com gerrit set-project-parent --parent kernel/common kernel/omap
$ ssh -p 29418 review.example.com gerrit set-project-parent --parent kernel/common kernel/omap
----
Reparent all children of `myParent` to `myOtherParent`:
----
$ ssh -p 29418 review.example.com gerrit set-project-parent \
--children-of myParent --parent myOtherParent
$ ssh -p 29418 review.example.com gerrit set-project-parent \
--children-of myParent --parent myOtherParent
----
== SEE ALSO

View File

@ -105,8 +105,8 @@ Change project `example` to be hidden, require change id, don't use content merg
and use 'merge if necessary' as merge strategy:
----
$ ssh -p 29418 review.example.com gerrit set-project example --submit-type MERGE_IF_NECESSARY\
--change-id true --content-merge false --project-state HIDDEN
$ ssh -p 29418 review.example.com gerrit set-project example --submit-type MERGE_IF_NECESSARY \
--change-id true --content-merge false --project-state HIDDEN
----
GERRIT

View File

@ -1,7 +1,7 @@
= gerrit set-reviewers
== NAME
gerrit set-reviewers - Add or remove reviewers to a change
gerrit set-reviewers - Add or remove reviewers to a change.
== SYNOPSIS
[verse]
@ -56,32 +56,32 @@ This command is intended to be used in scripts.
Add reviewers alice and bob, but remove eve from change Iac6b2ac2.
----
$ ssh -p 29418 review.example.com gerrit set-reviewers \
-a alice@example.com -a bob@example.com \
-r eve@example.com \
Iac6b2ac2
$ ssh -p 29418 review.example.com gerrit set-reviewers \
-a alice@example.com -a bob@example.com \
-r eve@example.com \
Iac6b2ac2
----
Add reviewer elvis to old-style change id 1935 specifying that the change is in project "graceland"
----
$ ssh -p 29418 review.example.com gerrit set-reviewers \
--project graceland \
-a elvis@example.com \
1935
$ ssh -p 29418 review.example.com gerrit set-reviewers \
--project graceland \
-a elvis@example.com \
1935
----
Add all project owners as reviewers to change Iac6b2ac2.
----
$ ssh -p 29418 review.example.com gerrit set-reviewers \
-a "'Project Owners'" \
Iac6b2ac2
$ ssh -p 29418 review.example.com gerrit set-reviewers \
-a "'Project Owners'" \
Iac6b2ac2
----
Add all project owners as reviewers to commit 13dff08acca571b22542ebd2e31acf4572ea0b86.
----
$ ssh -p 29418 review.example.com gerrit set-reviewers \
-a "'Project Owners'" \
13dff08acca571b22542ebd2e31acf4572ea0b86
$ ssh -p 29418 review.example.com gerrit set-reviewers \
-a "'Project Owners'" \
13dff08acca571b22542ebd2e31acf4572ea0b86
----
GERRIT

View File

@ -1,7 +1,7 @@
= gerrit show-caches
== NAME
gerrit show-caches - Display current cache statistics
gerrit show-caches - Display current cache statistics.
== SYNOPSIS
[verse]
@ -51,42 +51,42 @@ Intended for interactive use only.
== EXAMPLES
----
$ ssh -p 29418 review.example.com gerrit show-caches
Gerrit Code Review 2.9 now 11:14:13 CEST
uptime 6 days 20 hrs
Name |Entries | AvgGet |Hit Ratio|
| Mem Disk Space| |Mem Disk|
--------------------------------+---------------------+---------+---------+
accounts | 4096 | 3.4ms | 99% |
adv_bases | | | |
changes | | 27.1ms | 0% |
groups | 5646 | 11.8ms | 97% |
groups_bymember | | | |
groups_byname | | | |
groups_bysubgroup | 230 | 2.4ms | 62% |
groups_byuuid | 5612 | 29.2ms | 99% |
groups_external | 1 | 1.5s | 98% |
ldap_group_existence | | | |
ldap_groups | 650 | 680.5ms | 99% |
ldap_groups_byinclude | 1024 | | 83% |
ldap_usernames | 390 | 3.8ms | 81% |
permission_sort | 16384 | | 99% |
plugin_resources | | | |
project_list | 1 | 3.8s | 99% |
projects | 6477 | 2.9ms | 99% |
sshkeys | 2048 | 12.5ms | 99% |
D diff | 1299 62033 132.36m| 22.0ms | 85% 99%|
D diff_intraline | 12777 218651 128.45m| 171.1ms | 31% 96%|
D git_tags | 3 6 11.85k| | 0% 100%|
D web_sessions | 1024 151714 59.10m| | 99% 57%|
$ ssh -p 29418 review.example.com gerrit show-caches
Gerrit Code Review 2.9 now 11:14:13 CEST
uptime 6 days 20 hrs
Name |Entries | AvgGet |Hit Ratio|
| Mem Disk Space| |Mem Disk|
--------------------------------+---------------------+---------+---------+
accounts | 4096 | 3.4ms | 99% |
adv_bases | | | |
changes | | 27.1ms | 0% |
groups | 5646 | 11.8ms | 97% |
groups_bymember | | | |
groups_byname | | | |
groups_bysubgroup | 230 | 2.4ms | 62% |
groups_byuuid | 5612 | 29.2ms | 99% |
groups_external | 1 | 1.5s | 98% |
ldap_group_existence | | | |
ldap_groups | 650 | 680.5ms | 99% |
ldap_groups_byinclude | 1024 | | 83% |
ldap_usernames | 390 | 3.8ms | 81% |
permission_sort | 16384 | | 99% |
plugin_resources | | | |
project_list | 1 | 3.8s | 99% |
projects | 6477 | 2.9ms | 99% |
sshkeys | 2048 | 12.5ms | 99% |
D diff | 1299 62033 132.36m| 22.0ms | 85% 99%|
D diff_intraline | 12777 218651 128.45m| 171.1ms | 31% 96%|
D git_tags | 3 6 11.85k| | 0% 100%|
D web_sessions | 1024 151714 59.10m| | 99% 57%|
SSH: 385 users, oldest session started 6 days 20 hrs ago
Tasks: 10 total = 6 running + 0 ready + 4 sleeping
Mem: 14.94g total = 3.04g used + 11.89g free + 10.00m buffers
28.44g max
107 open files
SSH: 385 users, oldest session started 6 days 20 hrs ago
Tasks: 10 total = 6 running + 0 ready + 4 sleeping
Mem: 14.94g total = 3.04g used + 11.89g free + 10.00m buffers
28.44g max
107 open files
Threads: 4 CPUs available, 371 threads
Threads: 4 CPUs available, 371 threads
----
== SEE ALSO

View File

@ -1,7 +1,7 @@
= gerrit show-connections
== NAME
gerrit show-connections - Display active client SSH connections
gerrit show-connections - Display active client SSH connections.
== SYNOPSIS
[verse]
@ -65,20 +65,20 @@ Remote Host::
With reverse DNS lookup (default):
----
$ ssh -p 29418 review.example.com gerrit show-connections
Session Start Idle User Remote Host
--------------------------------------------------------------
3abf31e6 20:09:02 00:00:00 jdoe jdoe-desktop.example.com
--
$ ssh -p 29418 review.example.com gerrit show-connections
Session Start Idle User Remote Host
--------------------------------------------------------------
3abf31e6 20:09:02 00:00:00 jdoe jdoe-desktop.example.com
--
----
Without reverse DNS lookup:
----
$ ssh -p 29418 review.example.com gerrit show-connections -n
Session Start Idle User Remote Host
--------------------------------------------------------------
3abf31e6 20:09:02 00:00:00 a/1001240 10.0.0.1
--
$ ssh -p 29418 review.example.com gerrit show-connections -n
Session Start Idle User Remote Host
--------------------------------------------------------------
3abf31e6 20:09:02 00:00:00 a/1001240 10.0.0.1
--
----
GERRIT

View File

@ -1,7 +1,8 @@
= gerrit show-queue
== NAME
gerrit show-queue - Display the background work queues, including replication and indexing
gerrit show-queue - Display the background work queues, including replication
and indexing.
== SYNOPSIS
[verse]
@ -75,13 +76,13 @@ The following queue contains two tasks scheduled to replicate the
and `dst2`:
----
$ ssh -p 29418 review.example.com gerrit show-queue
Task State Command
------------------------------------------------------------------------------
7aae09b2 14:31:15.435 mirror dst1:/home/git/tools/gerrit.git
9ad09d27 14:31:25.434 mirror dst2:/var/cache/tools/gerrit.git
------------------------------------------------------------------------------
2 tasks
$ ssh -p 29418 review.example.com gerrit show-queue
Task State Command
------------------------------------------------------------------------------
7aae09b2 14:31:15.435 mirror dst1:/home/git/tools/gerrit.git
9ad09d27 14:31:25.434 mirror dst2:/var/cache/tools/gerrit.git
------------------------------------------------------------------------------
2 tasks
----
GERRIT

View File

@ -1,6 +1,6 @@
= gerrit stream-events
== NAME
gerrit stream-events - Monitor events occurring in real time
gerrit stream-events - Monitor events occurring in real time.
== SYNOPSIS
[verse]
@ -37,16 +37,16 @@ This command is intended to be used in scripts.
== EXAMPLES
----
$ ssh -p 29418 review.example.com gerrit stream-events
{"type":"comment-added",change:{"project":"tools/gerrit", ...}, ...}
{"type":"comment-added",change:{"project":"tools/gerrit", ...}, ...}
$ ssh -p 29418 review.example.com gerrit stream-events
{"type":"comment-added",change:{"project":"tools/gerrit", ...}, ...}
{"type":"comment-added",change:{"project":"tools/gerrit", ...}, ...}
----
Only subscribe to specific event types:
----
$ ssh -p 29418 review.example.com gerrit stream-events \
-s patchset-created -s ref-replicated
$ ssh -p 29418 review.example.com gerrit stream-events \
-s patchset-created -s ref-replicated
----
== SCHEMA

View File

@ -1,7 +1,7 @@
= suexec
== NAME
suexec - Execute a command as any registered user account
suexec - Execute a command as any registered user account.
== SYNOPSIS
[verse]
@ -49,13 +49,13 @@ This command is intended to be used in scripts.
Approve the change with commit c0ff33 as "Verified +1" as user bob@example.com
----
$ sudo -u gerrit ssh -p 29418 \
-i site_path/etc/ssh_host_rsa_key \
"Gerrit Code Review@localhost" \
suexec \
--as bob@example.com \
-- \
gerrit approve --verified +1 c0ff33
$ sudo -u gerrit ssh -p 29418 \
-i site_path/etc/ssh_host_rsa_key \
"Gerrit Code Review@localhost" \
suexec \
--as bob@example.com \
-- \
gerrit approve --verified +1 c0ff33
----
GERRIT

View File

@ -29,29 +29,29 @@ Can be used by anyone that has permission to read the specified changeset.
Test submit_rule from stdin and return the results as JSON.
----
cat rules.pl | ssh -p 29418 review.example.com gerrit test-submit rule -s I78f2c6673db24e4e92ed32f604c960dc952437d9
[
{
"status": "NOT_READY",
"reject": {
"Any-Label-Name": {}
}
}
]
cat rules.pl | ssh -p 29418 review.example.com gerrit test-submit rule -s I78f2c6673db24e4e92ed32f604c960dc952437d9
[
{
"status": "NOT_READY",
"reject": {
"Any-Label-Name": {}
}
}
]
----
Test the active submit_rule from the refs/meta/config branch, ignoring filters in the project parents.
----
$ ssh -p 29418 review.example.com gerrit test-submit rule I78f2c6673db24e4e92ed32f604c960dc952437d9 --no-filters
[
{
"status": "NOT_READY",
"need": {
"Code-Review": {}
"Verified": {}
}
}
]
$ ssh -p 29418 review.example.com gerrit test-submit rule I78f2c6673db24e4e92ed32f604c960dc952437d9 --no-filters
[
{
"status": "NOT_READY",
"need": {
"Code-Review": {}
"Verified": {}
}
}
]
----
== SCRIPTING

View File

@ -29,14 +29,14 @@ Can be used by anyone that has permission to read the specified change.
Test submit_type from stdin and return the submit type.
----
cat rules.pl | ssh -p 29418 review.example.com gerrit test-submit type -s I78f2c6673db24e4e92ed32f604c960dc952437d9
"MERGE_IF_NECESSARY"
cat rules.pl | ssh -p 29418 review.example.com gerrit test-submit type -s I78f2c6673db24e4e92ed32f604c960dc952437d9
"MERGE_IF_NECESSARY"
----
Test the active submit_type from the refs/meta/config branch, ignoring filters in the project parents.
----
$ ssh -p 29418 review.example.com gerrit test-submit type I78f2c6673db24e4e92ed32f604c960dc952437d9 --no-filters
"MERGE_IF_NECESSARY"
$ ssh -p 29418 review.example.com gerrit test-submit type I78f2c6673db24e4e92ed32f604c960dc952437d9 --no-filters
"MERGE_IF_NECESSARY"
----
== SCRIPTING

View File

@ -1,7 +1,7 @@
= gerrit version
== NAME
gerrit version - Show the version of the currently executing Gerrit server
gerrit version - Show the version of the currently executing Gerrit server.
== SYNOPSIS
[verse]
@ -34,8 +34,8 @@ This command is intended to be used in scripts.
== EXAMPLES
----
$ ssh -p 29418 review.example.com gerrit version
gerrit version 2.4.2
$ ssh -p 29418 review.example.com gerrit version
gerrit version 2.4.2
----
GERRIT