Clear up syntax for command reference files

Change-Id: I687a0efcb603912a96406876f8f987512d46e449
This commit is contained in:
David Shevitz 2018-09-26 12:31:46 -07:00
parent 51cb2ea2ff
commit e369eeee95
9 changed files with 61 additions and 64 deletions

@ -1,7 +1,7 @@
= gerrit index start = gerrit index start
== NAME == NAME
gerrit index start - Start the online indexer gerrit index start - Start the online indexer.
== SYNOPSIS == SYNOPSIS
[verse] [verse]
@ -44,7 +44,7 @@ This command is intended to be used in scripts.
Start the online indexer for the 'changes' index: Start the online indexer for the 'changes' index:
---- ----
$ ssh -p 29418 review.example.com gerrit index start changes $ ssh -p 29418 review.example.com gerrit index start changes
---- ----
GERRIT GERRIT

@ -1,7 +1,7 @@
= kill = kill
== NAME == NAME
kill - Cancel or abort a background task kill - Cancel or abort a background task.
== SYNOPSIS == SYNOPSIS
[verse] [verse]

@ -1,9 +1,9 @@
= gerrit logging ls-level = gerrit logging ls-level
== NAME == NAME
gerrit logging ls-level - view the logging level gerrit logging ls-level - view the logging level.
gerrit logging ls - view the logging level gerrit logging ls - view the logging level.
== SYNOPSIS == SYNOPSIS
[verse] [verse]
@ -27,13 +27,12 @@ Caller must have the ADMINISTRATE_SERVER capability.
View the logging level of the loggers in the package com.google: View the logging level of the loggers in the package com.google:
---- ----
$ssh -p 29418 review.example.com gerrit logging ls-level \ $ssh -p 29418 review.example.com gerrit logging ls-level com.google.
com.google.
---- ----
View the logging level of every logger View the logging level of every logger
---- ----
$ssh -p 29418 review.example.com gerrit logging ls-level $ssh -p 29418 review.example.com gerrit logging ls-level
---- ----
GERRIT GERRIT

@ -1,9 +1,9 @@
= gerrit logging set-level = gerrit logging set-level
== NAME == NAME
gerrit logging set-level - set the logging level gerrit logging set-level - set the logging level.
gerrit logging set - set the logging level gerrit logging set - set the logging level.
== SYNOPSIS == SYNOPSIS
[verse] [verse]
@ -34,14 +34,12 @@ Caller must have the ADMINISTRATE_SERVER capability.
Change the logging level of the loggers in the package com.google to DEBUG. Change the logging level of the loggers in the package com.google to DEBUG.
---- ----
$ssh -p 29418 review.example.com gerrit logging set-level \ $ssh -p 29418 review.example.com gerrit logging set-level debug com.google.
debug com.google.
---- ----
Reset the logging level of every logger to what they were at deployment time. Reset the logging level of every logger to what they were at deployment time.
---- ----
$ssh -p 29418 review.example.com gerrit logging set-level \ $ssh -p 29418 review.example.com gerrit logging set-level reset
reset
---- ----
GERRIT GERRIT

@ -1,7 +1,7 @@
= gerrit ls-groups = gerrit ls-groups
== NAME == NAME
gerrit ls-groups - List groups visible to caller gerrit ls-groups - List groups visible to caller.
== SYNOPSIS == SYNOPSIS
[verse] [verse]
@ -88,53 +88,53 @@ nonexistent group, the owner group name field will read `n/a`.
List visible groups: List visible groups:
---- ----
$ ssh -p 29418 review.example.com gerrit ls-groups $ ssh -p 29418 review.example.com gerrit ls-groups
Administrators Administrators
Anonymous Users Anonymous Users
MyProject_Committers MyProject_Committers
Project Owners Project Owners
Registered Users Registered Users
---- ----
List all groups for which any permission is set for the project List all groups for which any permission is set for the project
"MyProject": "MyProject":
---- ----
$ ssh -p 29418 review.example.com gerrit ls-groups --project MyProject $ ssh -p 29418 review.example.com gerrit ls-groups --project MyProject
MyProject_Committers MyProject_Committers
Project Owners Project Owners
Registered Users Registered Users
---- ----
List all groups which are owned by the calling user: List all groups which are owned by the calling user:
---- ----
$ ssh -p 29418 review.example.com gerrit ls-groups --owned $ ssh -p 29418 review.example.com gerrit ls-groups --owned
MyProject_Committers MyProject_Committers
MyProject_Verifiers MyProject_Verifiers
---- ----
Check if the calling user owns the group `MyProject_Committers`. If Check if the calling user owns the group `MyProject_Committers`. If
`MyProject_Committers` is returned the calling user owns this group. `MyProject_Committers` is returned the calling user owns this group.
If the result is empty, the calling user doesn't own the group. If the result is empty, the calling user doesn't own the group.
---- ----
$ ssh -p 29418 review.example.com gerrit ls-groups --owned -q MyProject_Committers $ ssh -p 29418 review.example.com gerrit ls-groups --owned -q MyProject_Committers
MyProject_Committers MyProject_Committers
---- ----
Extract the UUID of the 'Administrators' group: Extract the UUID of the 'Administrators' group:
---- ----
$ ssh -p 29418 review.example.com gerrit ls-groups -v | awk '-F\t' '$1 == "Administrators" {print $2}' $ ssh -p 29418 review.example.com gerrit ls-groups -v | awk '-F\t' '$1 == "Administrators" {print $2}'
ad463411db3eec4e1efb0d73f55183c1db2fd82a ad463411db3eec4e1efb0d73f55183c1db2fd82a
---- ----
Extract and expand the multi-line description of the 'Administrators' Extract and expand the multi-line description of the 'Administrators'
group: group:
---- ----
$ printf "$(ssh -p 29418 review.example.com gerrit ls-groups -v | awk '-F\t' '$1 == "Administrators" {print $3}')\n" $ printf "$(ssh -p 29418 review.example.com gerrit ls-groups -v | awk '-F\t' '$1 == "Administrators" {print $3}')\n"
This is a This is a
multi-line multi-line
description. description.
---- ----
GERRIT GERRIT

@ -1,7 +1,7 @@
= gerrit ls-members = gerrit ls-members
== NAME == NAME
gerrit ls-members - Show members of a given group gerrit ls-members - Show members of a given group.
== SYNOPSIS == SYNOPSIS
[verse] [verse]
@ -40,17 +40,17 @@ the output.
List members of the Administrators group: List members of the Administrators group:
---- ----
$ ssh -p 29418 review.example.com gerrit ls-members Administrators $ ssh -p 29418 review.example.com gerrit ls-members Administrators
id username full name email id username full name email
100000 jim Jim Bob somebody@example.com 100000 jim Jim Bob somebody@example.com
100001 johnny John Smith n/a 100001 johnny John Smith n/a
100002 mrnoname n/a someoneelse@example.com 100002 mrnoname n/a someoneelse@example.com
---- ----
List members of a non-existent group: List members of a non-existent group:
---- ----
$ ssh -p 29418 review.example.com gerrit ls-members BadlySpelledGroup $ ssh -p 29418 review.example.com gerrit ls-members BadlySpelledGroup
Group not found or not visible Group not found or not visible
---- ----
GERRIT GERRIT

@ -1,7 +1,7 @@
= gerrit ls-projects = gerrit ls-projects
== NAME == NAME
gerrit ls-projects - List projects visible to caller gerrit ls-projects - List projects visible to caller.
== SYNOPSIS == SYNOPSIS
[verse] [verse]
@ -115,28 +115,28 @@ by the client in the request headers.
List visible projects: List visible projects:
---- ----
$ ssh -p 29418 review.example.com gerrit ls-projects $ ssh -p 29418 review.example.com gerrit ls-projects
platform/manifest platform/manifest
tools/gerrit tools/gerrit
tools/gwtorm tools/gwtorm
$ curl http://review.example.com/projects/ $ curl http://review.example.com/projects/
platform/manifest platform/manifest
tools/gerrit tools/gerrit
tools/gwtorm tools/gwtorm
$ curl http://review.example.com/projects/tools/ $ curl http://review.example.com/projects/tools/
tools/gerrit tools/gerrit
tools/gwtorm tools/gwtorm
---- ----
Clone any project visible to the user: Clone any project visible to the user:
---- ----
for p in `ssh -p 29418 review.example.com gerrit ls-projects` for p in `ssh -p 29418 review.example.com gerrit ls-projects`
do do
mkdir -p `dirname "$p"` mkdir -p `dirname "$p"`
git clone --bare "ssh://review.example.com:29418/$p.git" "$p.git" git clone --bare "ssh://review.example.com:29418/$p.git" "$p.git"
done done
---- ----
== SEE ALSO == SEE ALSO

@ -1,7 +1,7 @@
= gerrit ls-user-refs = gerrit ls-user-refs
== NAME == NAME
gerrit ls-user-refs - List refs visible to a specific user gerrit ls-user-refs - List refs visible to a specific user.
== SYNOPSIS == SYNOPSIS
[verse] [verse]
@ -42,7 +42,7 @@ Administrators
List visible refs for the user "mr.developer" in project "gerrit" List visible refs for the user "mr.developer" in project "gerrit"
---- ----
$ ssh -p 29418 review.example.com gerrit ls-user-refs -p gerrit -u mr.developer $ ssh -p 29418 review.example.com gerrit ls-user-refs -p gerrit -u mr.developer
---- ----
GERRIT GERRIT

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