Fix formatting of example blocks
With the new stylesheet example blocks (delimited with ====) are rendered as rather intrusive boxes with large padding in yellow and grey. This patch replaces the example blocks with simple code blocks (delimited with ----) that better match the overall style of the documentation. Change-Id: Id95387cdb153332c2066e2d5e378697647dbca52 Signed-off-by: Michael Ochmann <michael.ochmann@sap.com>
This commit is contained in:
@@ -421,10 +421,10 @@ draft patch sets of a change into public patch sets for review.
|
|||||||
To block push permission to `+refs/drafts/*+` the following permission rule can
|
To block push permission to `+refs/drafts/*+` the following permission rule can
|
||||||
be configured:
|
be configured:
|
||||||
|
|
||||||
====
|
----
|
||||||
[access "refs/drafts/*"]
|
[access "refs/drafts/*"]
|
||||||
push = block group Anonymous Users
|
push = block group Anonymous Users
|
||||||
====
|
----
|
||||||
|
|
||||||
|
|
||||||
[[access_categories]]
|
[[access_categories]]
|
||||||
@@ -637,15 +637,15 @@ This category permits users to push an annotated tag object into the
|
|||||||
project's repository. Typically this would be done with a command line
|
project's repository. Typically this would be done with a command line
|
||||||
such as:
|
such as:
|
||||||
|
|
||||||
====
|
----
|
||||||
git push ssh://USER@HOST:PORT/PROJECT tag v1.0
|
git push ssh://USER@HOST:PORT/PROJECT tag v1.0
|
||||||
====
|
----
|
||||||
|
|
||||||
Or:
|
Or:
|
||||||
|
|
||||||
====
|
----
|
||||||
git push https://HOST/PROJECT tag v1.0
|
git push https://HOST/PROJECT tag v1.0
|
||||||
====
|
----
|
||||||
|
|
||||||
Tags must be annotated (created with `git tag -a`), should exist in
|
Tags must be annotated (created with `git tag -a`), should exist in
|
||||||
the `refs/tags/` namespace, and should be new.
|
the `refs/tags/` namespace, and should be new.
|
||||||
@@ -677,15 +677,15 @@ This category permits users to push a PGP signed tag object into the
|
|||||||
project's repository. Typically this would be done with a command
|
project's repository. Typically this would be done with a command
|
||||||
line such as:
|
line such as:
|
||||||
|
|
||||||
====
|
----
|
||||||
git push ssh://USER@HOST:PORT/PROJECT tag v1.0
|
git push ssh://USER@HOST:PORT/PROJECT tag v1.0
|
||||||
====
|
----
|
||||||
|
|
||||||
Or:
|
Or:
|
||||||
|
|
||||||
====
|
----
|
||||||
git push https://HOST/PROJECT tag v1.0
|
git push https://HOST/PROJECT tag v1.0
|
||||||
====
|
----
|
||||||
|
|
||||||
Tags must be signed (created with `git tag -s`), should exist in the
|
Tags must be signed (created with `git tag -s`), should exist in the
|
||||||
`refs/tags/` namespace, and should be new.
|
`refs/tags/` namespace, and should be new.
|
||||||
@@ -1069,10 +1069,10 @@ It is also possible to block label ranges. To block a group 'X' from voting
|
|||||||
'-2' and '+2', but keep their existing voting permissions for the '-1..+1'
|
'-2' and '+2', but keep their existing voting permissions for the '-1..+1'
|
||||||
range intact we would define:
|
range intact we would define:
|
||||||
|
|
||||||
====
|
----
|
||||||
[access "refs/heads/*"]
|
[access "refs/heads/*"]
|
||||||
label-Code-Review = block -2..+2 group X
|
label-Code-Review = block -2..+2 group X
|
||||||
====
|
----
|
||||||
|
|
||||||
The interpretation of the 'min..max' range in case of a blocking rule is: block
|
The interpretation of the 'min..max' range in case of a blocking rule is: block
|
||||||
every vote from '-INFINITE..min' and 'max..INFINITE'. For the example above it
|
every vote from '-INFINITE..min' and 'max..INFINITE'. For the example above it
|
||||||
@@ -1083,11 +1083,11 @@ means that the range '-1..+1' is not affected by this block.
|
|||||||
When an access section of a project contains a 'BLOCK' and an 'ALLOW' rule for
|
When an access section of a project contains a 'BLOCK' and an 'ALLOW' rule for
|
||||||
the same permission then this 'ALLOW' rule overrides the 'BLOCK' rule:
|
the same permission then this 'ALLOW' rule overrides the 'BLOCK' rule:
|
||||||
|
|
||||||
====
|
----
|
||||||
[access "refs/heads/*"]
|
[access "refs/heads/*"]
|
||||||
push = block group X
|
push = block group X
|
||||||
push = group Y
|
push = group Y
|
||||||
====
|
----
|
||||||
|
|
||||||
In this case a user which is a member of the group 'Y' will still be allowed to
|
In this case a user which is a member of the group 'Y' will still be allowed to
|
||||||
push to 'refs/heads/*' even if it is a member of the group 'X'.
|
push to 'refs/heads/*' even if it is a member of the group 'X'.
|
||||||
@@ -1108,22 +1108,22 @@ This requirement is quite common in a corporate deployment where
|
|||||||
reproducibility of a build must be guaranteed. To achieve that we block 'push'
|
reproducibility of a build must be guaranteed. To achieve that we block 'push'
|
||||||
permission for the <<anonymous_users,'Anonymous Users'>> in "`All-Projects`":
|
permission for the <<anonymous_users,'Anonymous Users'>> in "`All-Projects`":
|
||||||
|
|
||||||
====
|
----
|
||||||
[access "refs/tags/*"]
|
[access "refs/tags/*"]
|
||||||
push = block group Anonymous Users
|
push = block group Anonymous Users
|
||||||
====
|
----
|
||||||
|
|
||||||
By blocking the <<anonymous_users,'Anonymous Users'>> we effectively block
|
By blocking the <<anonymous_users,'Anonymous Users'>> we effectively block
|
||||||
everyone as everyone is a member of that group. Note that the permission to
|
everyone as everyone is a member of that group. Note that the permission to
|
||||||
create a tag is still necessary. Assuming that only <<category_owner,project
|
create a tag is still necessary. Assuming that only <<category_owner,project
|
||||||
owners>> are allowed to create tags, we would extend the example above:
|
owners>> are allowed to create tags, we would extend the example above:
|
||||||
|
|
||||||
====
|
----
|
||||||
[access "refs/tags/*"]
|
[access "refs/tags/*"]
|
||||||
push = block group Anonymous Users
|
push = block group Anonymous Users
|
||||||
create = group Project Owners
|
create = group Project Owners
|
||||||
pushTag = group Project Owners
|
pushTag = group Project Owners
|
||||||
====
|
----
|
||||||
|
|
||||||
|
|
||||||
==== Let only a dedicated group vote in a special category
|
==== Let only a dedicated group vote in a special category
|
||||||
@@ -1136,11 +1136,11 @@ this category. We have to block everyone except the 'Release Engineers' to vote
|
|||||||
in this category and, of course, allow 'Release Engineers' to vote in that
|
in this category and, of course, allow 'Release Engineers' to vote in that
|
||||||
category. In the "`All-Projects`" we define the following rules:
|
category. In the "`All-Projects`" we define the following rules:
|
||||||
|
|
||||||
====
|
----
|
||||||
[access "refs/heads/stable*"]
|
[access "refs/heads/stable*"]
|
||||||
label-Release-Process = block -1..+1 group Anonymous Users
|
label-Release-Process = block -1..+1 group Anonymous Users
|
||||||
label-Release-Process = -1..+1 group Release Engineers
|
label-Release-Process = -1..+1 group Release Engineers
|
||||||
====
|
----
|
||||||
|
|
||||||
[[global_capabilities]]
|
[[global_capabilities]]
|
||||||
== Global Capabilities
|
== Global Capabilities
|
||||||
|
@@ -44,10 +44,10 @@ This command is intended to be used in scripts.
|
|||||||
Ban commit `421919d015c062fd28901fe144a78a555d0b5984` from project
|
Ban commit `421919d015c062fd28901fe144a78a555d0b5984` from project
|
||||||
`myproject`:
|
`myproject`:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit ban-commit myproject \
|
$ ssh -p 29418 review.example.com gerrit ban-commit myproject \
|
||||||
421919d015c062fd28901fe144a78a555d0b5984
|
421919d015c062fd28901fe144a78a555d0b5984
|
||||||
====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -33,11 +33,11 @@ each commit message.
|
|||||||
To obtain the 'gerrit-cherry-pick' script use scp, curl or wget to
|
To obtain the 'gerrit-cherry-pick' script use scp, curl or wget to
|
||||||
copy it to your local system:
|
copy it to your local system:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ scp -p -P 29418 john.doe@review.example.com:bin/gerrit-cherry-pick ~/bin/
|
$ scp -p -P 29418 john.doe@review.example.com:bin/gerrit-cherry-pick ~/bin/
|
||||||
|
|
||||||
$ curl -Lo ~/bin/gerrit-cherry-pick http://review.example.com/tools/bin/gerrit-cherry-pick
|
$ curl -Lo ~/bin/gerrit-cherry-pick http://review.example.com/tools/bin/gerrit-cherry-pick
|
||||||
====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -68,9 +68,9 @@ This most likely requires double quoting the value, for example
|
|||||||
Create a new batch/role access user account called `watcher` in
|
Create a new batch/role access user account called `watcher` in
|
||||||
the 'Non-Interactive Users' group.
|
the 'Non-Interactive Users' group.
|
||||||
|
|
||||||
====
|
----
|
||||||
$ cat ~/.ssh/id_watcher.pub | ssh -p 29418 review.example.com gerrit create-account --group "'Non-Interactive Users'" --ssh-key - watcher
|
$ cat ~/.ssh/id_watcher.pub | ssh -p 29418 review.example.com gerrit create-account --group "'Non-Interactive Users'" --ssh-key - watcher
|
||||||
====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -39,9 +39,9 @@ This command is intended to be used in scripts.
|
|||||||
Create a new branch called 'newbranch' from the 'master' branch of
|
Create a new branch called 'newbranch' from the 'master' branch of
|
||||||
the project 'myproject'.
|
the project 'myproject'.
|
||||||
|
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit create-branch myproject newbranch master
|
$ ssh -p 29418 review.example.com gerrit create-branch myproject newbranch master
|
||||||
====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -67,16 +67,16 @@ to the group.
|
|||||||
Create a new account group called `gerritdev` with two initial members
|
Create a new account group called `gerritdev` with two initial members
|
||||||
`developer1` and `developer2`. The group should be owned by itself:
|
`developer1` and `developer2`. The group should be owned by itself:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 user@review.example.com gerrit create-group --member developer1 --member developer2 gerritdev
|
$ ssh -p 29418 user@review.example.com gerrit create-group --member developer1 --member developer2 gerritdev
|
||||||
====
|
----
|
||||||
|
|
||||||
Create a new account group called `Foo` owned by the `Foo-admin` group.
|
Create a new account group called `Foo` owned by the `Foo-admin` group.
|
||||||
Put `developer1` as the initial member and include group description:
|
Put `developer1` as the initial member and include group description:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 user@review.example.com gerrit create-group --owner Foo-admin --member developer1 --description "'Foo description'" Foo
|
$ ssh -p 29418 user@review.example.com gerrit create-group --owner Foo-admin --member developer1 --description "'Foo description'" Foo
|
||||||
====
|
----
|
||||||
|
|
||||||
Note that it is necessary to quote the description twice. The local
|
Note that it is necessary to quote the description twice. The local
|
||||||
shell needs double quotes around the value to ensure the single quotes
|
shell needs double quotes around the value to ensure the single quotes
|
||||||
|
@@ -171,15 +171,15 @@ Common unit suffixes of 'k', 'm', or 'g' are supported.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
Create a new project called `tools/gerrit`:
|
Create a new project called `tools/gerrit`:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit create-project tools/gerrit.git
|
$ ssh -p 29418 review.example.com gerrit create-project tools/gerrit.git
|
||||||
====
|
----
|
||||||
|
|
||||||
Create a new project with a description:
|
Create a new project with a description:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit create-project tool.git --description "'Tools used by build system'"
|
$ ssh -p 29418 review.example.com gerrit create-project tool.git --description "'Tools used by build system'"
|
||||||
====
|
----
|
||||||
|
|
||||||
Note that it is necessary to quote the description twice. The local
|
Note that it is necessary to quote the description twice. The local
|
||||||
shell needs double quotes around the value to ensure the single quotes
|
shell needs double quotes around the value to ensure the single quotes
|
||||||
@@ -190,9 +190,9 @@ the single quotes to delimit the value.
|
|||||||
If the replication plugin is installed, the plugin will attempt to
|
If the replication plugin is installed, the plugin will attempt to
|
||||||
perform remote repository creation by a Bourne shell script:
|
perform remote repository creation by a Bourne shell script:
|
||||||
|
|
||||||
====
|
----
|
||||||
mkdir -p '/base/project.git' && cd '/base/project.git' && git init --bare && git update-ref HEAD refs/heads/master
|
mkdir -p '/base/project.git' && cd '/base/project.git' && git init --bare && git update-ref HEAD refs/heads/master
|
||||||
====
|
----
|
||||||
|
|
||||||
For this to work successfully the remote system must be able to run
|
For this to work successfully the remote system must be able to run
|
||||||
arbitrary shell scripts, and must have `git` in the user's PATH
|
arbitrary shell scripts, and must have `git` in the user's PATH
|
||||||
|
@@ -57,7 +57,7 @@ This command is intended to be used in scripts.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
List caches available for flushing:
|
List caches available for flushing:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit flush-caches --list
|
$ ssh -p 29418 review.example.com gerrit flush-caches --list
|
||||||
accounts
|
accounts
|
||||||
accounts_byemail
|
accounts_byemail
|
||||||
@@ -68,32 +68,32 @@ List caches available for flushing:
|
|||||||
projects
|
projects
|
||||||
sshkeys
|
sshkeys
|
||||||
web_sessions
|
web_sessions
|
||||||
====
|
----
|
||||||
|
|
||||||
Flush all caches known to the server, forcing them to recompute:
|
Flush all caches known to the server, forcing them to recompute:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit flush-caches --all
|
$ ssh -p 29418 review.example.com gerrit flush-caches --all
|
||||||
====
|
----
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit flush-caches
|
$ ssh -p 29418 review.example.com gerrit flush-caches
|
||||||
====
|
----
|
||||||
|
|
||||||
Flush only the "sshkeys" cache, after manually editing an SSH key
|
Flush only the "sshkeys" cache, after manually editing an SSH key
|
||||||
for a user:
|
for a user:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit flush-caches --cache sshkeys
|
$ ssh -p 29418 review.example.com gerrit flush-caches --cache sshkeys
|
||||||
====
|
----
|
||||||
|
|
||||||
Flush "web_sessions", forcing all users to sign-in again:
|
Flush "web_sessions", forcing all users to sign-in again:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit flush-caches --cache web_sessions
|
$ ssh -p 29418 review.example.com gerrit flush-caches --cache web_sessions
|
||||||
====
|
----
|
||||||
|
|
||||||
== SEE ALSO
|
== SEE ALSO
|
||||||
|
|
||||||
|
@@ -53,7 +53,7 @@ This command is intended to be used in scripts.
|
|||||||
|
|
||||||
Run the Git garbage collection for the projects 'myProject' and
|
Run the Git garbage collection for the projects 'myProject' and
|
||||||
'yourProject':
|
'yourProject':
|
||||||
=====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit gc myProject yourProject
|
$ ssh -p 29418 review.example.com gerrit gc myProject yourProject
|
||||||
collecting garbage for "myProject":
|
collecting garbage for "myProject":
|
||||||
...
|
...
|
||||||
@@ -62,12 +62,12 @@ Run the Git garbage collection for the projects 'myProject' and
|
|||||||
collecting garbage for "yourProject":
|
collecting garbage for "yourProject":
|
||||||
...
|
...
|
||||||
done.
|
done.
|
||||||
=====
|
----
|
||||||
|
|
||||||
Run the Git garbage collection for all projects:
|
Run the Git garbage collection for all projects:
|
||||||
=====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit gc --all
|
$ ssh -p 29418 review.example.com gerrit gc --all
|
||||||
=====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -41,7 +41,7 @@ JSON_SINGLE.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
To manually correct a user's SSH user name:
|
To manually correct a user's SSH user name:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit gsql
|
$ ssh -p 29418 review.example.com gerrit gsql
|
||||||
Welcome to Gerrit Code Review v2.0.25
|
Welcome to Gerrit Code Review v2.0.25
|
||||||
(PostgreSQL 8.3.8)
|
(PostgreSQL 8.3.8)
|
||||||
@@ -54,7 +54,7 @@ To manually correct a user's SSH user name:
|
|||||||
Bye
|
Bye
|
||||||
|
|
||||||
$ ssh -p 29418 review.example.com gerrit flush-caches --cache sshkeys --cache accounts
|
$ ssh -p 29418 review.example.com gerrit flush-caches --cache sshkeys --cache accounts
|
||||||
====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -63,26 +63,26 @@ it to your local system from your Gerrit server.
|
|||||||
|
|
||||||
You can use either of the below commands:
|
You can use either of the below commands:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ scp -p -P 29418 <your username>@<your Gerrit review server>:hooks/commit-msg <local path to your git>/.git/hooks/
|
$ scp -p -P 29418 <your username>@<your Gerrit review server>:hooks/commit-msg <local path to your git>/.git/hooks/
|
||||||
|
|
||||||
$ curl -Lo <local path to your git>/.git/hooks/commit-msg <your Gerrit http URL>/tools/hooks/commit-msg
|
$ curl -Lo <local path to your git>/.git/hooks/commit-msg <your Gerrit http URL>/tools/hooks/commit-msg
|
||||||
====
|
----
|
||||||
|
|
||||||
A specific example of this might look something like this:
|
A specific example of this might look something like this:
|
||||||
|
|
||||||
.Example
|
.Example
|
||||||
====
|
----
|
||||||
$ scp -p -P 29418 john.doe@review.example.com:hooks/commit-msg ~/duhproject/.git/hooks/
|
$ scp -p -P 29418 john.doe@review.example.com:hooks/commit-msg ~/duhproject/.git/hooks/
|
||||||
|
|
||||||
$ curl -Lo ~/duhproject/.git/hooks/commit-msg http://review.example.com/tools/hooks/commit-msg
|
$ curl -Lo ~/duhproject/.git/hooks/commit-msg http://review.example.com/tools/hooks/commit-msg
|
||||||
====
|
----
|
||||||
|
|
||||||
Make sure the hook file is executable:
|
Make sure the hook file is executable:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ chmod u+x ~/duhproject/.git/hooks/commit-msg
|
$ chmod u+x ~/duhproject/.git/hooks/commit-msg
|
||||||
====
|
----
|
||||||
|
|
||||||
== SEE ALSO
|
== SEE ALSO
|
||||||
|
|
||||||
|
@@ -29,9 +29,9 @@ This command is intended to be used in scripts.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
Index changes with legacy ID numbers 1 and 2.
|
Index changes with legacy ID numbers 1 and 2.
|
||||||
|
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 user@review.example.com gerrit index changes 1 2
|
$ ssh -p 29418 user@review.example.com gerrit index changes 1 2
|
||||||
====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -7,11 +7,13 @@ from Gerrit's daemon, and then executed on the client system.
|
|||||||
|
|
||||||
To download a client command or hook, use scp or an http client:
|
To download a client command or hook, use scp or an http client:
|
||||||
|
|
||||||
|
----
|
||||||
$ scp -p -P 29418 john.doe@review.example.com:bin/gerrit-cherry-pick ~/bin/
|
$ scp -p -P 29418 john.doe@review.example.com:bin/gerrit-cherry-pick ~/bin/
|
||||||
$ scp -p -P 29418 john.doe@review.example.com:hooks/commit-msg .git/hooks/
|
$ scp -p -P 29418 john.doe@review.example.com:hooks/commit-msg .git/hooks/
|
||||||
|
|
||||||
$ curl -Lo ~/bin/gerrit-cherry-pick http://review.example.com/tools/bin/gerrit-cherry-pick
|
$ curl -Lo ~/bin/gerrit-cherry-pick http://review.example.com/tools/bin/gerrit-cherry-pick
|
||||||
$ curl -Lo .git/hooks/commit-msg http://review.example.com/tools/hooks/commit-msg
|
$ curl -Lo .git/hooks/commit-msg http://review.example.com/tools/hooks/commit-msg
|
||||||
|
----
|
||||||
|
|
||||||
For more details on how to determine the correct SSH port number,
|
For more details on how to determine the correct SSH port number,
|
||||||
see link:user-upload.html#test_ssh[Testing Your SSH Connection].
|
see link:user-upload.html#test_ssh[Testing Your SSH Connection].
|
||||||
@@ -38,7 +40,9 @@ several other commands over its internal SSH daemon. As Gerrit does
|
|||||||
not provide an interactive shell, the commands must be triggered
|
not provide an interactive shell, the commands must be triggered
|
||||||
from an ssh client, for example:
|
from an ssh client, for example:
|
||||||
|
|
||||||
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit ls-projects
|
$ ssh -p 29418 review.example.com gerrit ls-projects
|
||||||
|
----
|
||||||
|
|
||||||
For more details on how to determine the correct SSH port number,
|
For more details on how to determine the correct SSH port number,
|
||||||
see link:user-upload.html#test_ssh[Testing Your SSH Connection].
|
see link:user-upload.html#test_ssh[Testing Your SSH Connection].
|
||||||
|
@@ -26,15 +26,15 @@ Caller must have the ADMINISTRATE_SERVER capability.
|
|||||||
== Examples
|
== Examples
|
||||||
|
|
||||||
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
|
||||||
------
|
------
|
||||||
|
@@ -33,16 +33,16 @@ Caller must have the ADMINISTRATE_SERVER capability.
|
|||||||
== Examples
|
== Examples
|
||||||
|
|
||||||
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
|
||||||
------
|
------
|
||||||
|
@@ -87,55 +87,55 @@ nonexistent group, the owner group name field will read `n/a`.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
|
|
||||||
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
|
||||||
------
|
------
|
||||||
|
@@ -39,19 +39,19 @@ the output.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
|
|
||||||
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
|
||||||
------
|
------
|
||||||
|
@@ -114,7 +114,7 @@ by the client in the request headers.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
|
|
||||||
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
|
||||||
@@ -128,16 +128,16 @@ List visible projects:
|
|||||||
$ 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
|
||||||
|
|
||||||
|
@@ -41,9 +41,9 @@ Administrators
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
|
|
||||||
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
|
||||||
------
|
------
|
||||||
|
@@ -31,9 +31,9 @@ This command is intended to be used in scripts.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
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
|
||||||
------
|
------
|
||||||
|
@@ -45,31 +45,31 @@ This command is intended to be used in scripts.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
Install a plugin from an absolute file path on the server's host:
|
Install a plugin from an absolute file path on the server's host:
|
||||||
|
|
||||||
====
|
----
|
||||||
ssh -p 29418 localhost gerrit plugin install -n name.jar \
|
ssh -p 29418 localhost gerrit plugin install -n name.jar \
|
||||||
$(pwd)/my-plugin.jar
|
$(pwd)/my-plugin.jar
|
||||||
====
|
----
|
||||||
|
|
||||||
Install a WebUi plugin from an absolute file path on the server's host:
|
Install a WebUi plugin from an absolute file path on the server's host:
|
||||||
|
|
||||||
====
|
----
|
||||||
ssh -p 29418 localhost gerrit plugin install -n name.js \
|
ssh -p 29418 localhost gerrit plugin install -n name.js \
|
||||||
$(pwd)/my-webui-plugin.js
|
$(pwd)/my-webui-plugin.js
|
||||||
====
|
----
|
||||||
|
|
||||||
Install a plugin from an HTTP site:
|
Install a plugin from an HTTP site:
|
||||||
|
|
||||||
====
|
----
|
||||||
ssh -p 29418 localhost gerrit plugin install -n name.jar \
|
ssh -p 29418 localhost gerrit plugin install -n name.jar \
|
||||||
http://build-server/output/our-plugin
|
http://build-server/output/our-plugin
|
||||||
====
|
----
|
||||||
|
|
||||||
Install a plugin from piped input:
|
Install a plugin from piped input:
|
||||||
|
|
||||||
====
|
----
|
||||||
ssh -p 29418 localhost gerrit plugin install -n name.jar \
|
ssh -p 29418 localhost gerrit plugin install -n name.jar \
|
||||||
- <target/name-0.1.jar
|
- <target/name-0.1.jar
|
||||||
====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -35,9 +35,9 @@ This command is intended to be used in scripts.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
Reload a plugin:
|
Reload a plugin:
|
||||||
|
|
||||||
====
|
----
|
||||||
ssh -p 29418 localhost gerrit plugin reload my-plugin
|
ssh -p 29418 localhost gerrit plugin reload my-plugin
|
||||||
====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -32,9 +32,9 @@ This command is intended to be used in scripts.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
Disable a plugin:
|
Disable a plugin:
|
||||||
|
|
||||||
====
|
----
|
||||||
ssh -p 29418 localhost gerrit plugin remove my-plugin
|
ssh -p 29418 localhost gerrit plugin remove my-plugin
|
||||||
====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -116,20 +116,20 @@ This command is intended to be used in scripts.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
|
|
||||||
Find the 2 most recent open changes in the tools/gerrit project:
|
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
|
$ ssh -p 29418 review.example.com gerrit query --format=JSON status:open project:tools/gerrit limit:2
|
||||||
{"project":"tools/gerrit", ...}
|
{"project":"tools/gerrit", ...}
|
||||||
{"project":"tools/gerrit", ...}
|
{"project":"tools/gerrit", ...}
|
||||||
{"type":"stats","rowCount":2,"runningTimeMilliseconds:15}
|
{"type":"stats","rowCount":2,"runningTimeMilliseconds:15}
|
||||||
====
|
----
|
||||||
|
|
||||||
Skip number of changes:
|
Skip number of changes:
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit query --format=JSON --start 42 status:open project:tools/gerrit limit:2
|
$ 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", ...}
|
||||||
{"project":"tools/gerrit", ...}
|
{"project":"tools/gerrit", ...}
|
||||||
{"type":"stats","rowCount":1,"runningTimeMilliseconds:15}
|
{"type":"stats","rowCount":1,"runningTimeMilliseconds:15}
|
||||||
====
|
----
|
||||||
|
|
||||||
|
|
||||||
== SCHEMA
|
== SCHEMA
|
||||||
|
@@ -42,25 +42,25 @@ Any user who has configured an SSH key.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
|
|
||||||
Send a review for a change on the master branch to charlie@example.com:
|
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':
|
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:
|
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:
|
Configure a push macro to perform the last action:
|
||||||
====
|
----
|
||||||
git config remote.charlie.url ssh://review.example.com:29418/project
|
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.push HEAD:refs/for/master%r=charlie@example.com,cc=alice@example.com,cc=bob@example.com
|
||||||
====
|
----
|
||||||
|
|
||||||
afterwards `.git/config` contains the following:
|
afterwards `.git/config` contains the following:
|
||||||
----
|
----
|
||||||
@@ -71,9 +71,9 @@ afterwards `.git/config` contains the following:
|
|||||||
|
|
||||||
and now sending a new change for review to charlie, CC'ing both
|
and now sending a new change for review to charlie, CC'ing both
|
||||||
alice and bob is much easier:
|
alice and bob is much easier:
|
||||||
====
|
----
|
||||||
git push charlie
|
git push charlie
|
||||||
====
|
----
|
||||||
|
|
||||||
== SEE ALSO
|
== SEE ALSO
|
||||||
|
|
||||||
|
@@ -31,9 +31,9 @@ This command is intended to be used in scripts.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
Rename the group "MyGroup" to "MyCommitters".
|
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
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -153,37 +153,37 @@ This command is intended to be used in scripts.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
|
|
||||||
Approve the change with commit c0ff33 as "Verified +1"
|
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":
|
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
|
Append the message "Build Successful". Notice two levels of quoting is
|
||||||
required, one for the local shell, and another for the argument parser
|
required, one for the local shell, and another for the argument parser
|
||||||
inside the Gerrit server:
|
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
|
Mark the unmerged commits both "Verified +1" and "Code-Review +2" and
|
||||||
submit them for merging:
|
submit them for merging:
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit review \
|
$ ssh -p 29418 review.example.com gerrit review \
|
||||||
--verified +1 \
|
--verified +1 \
|
||||||
--code-review +2 \
|
--code-review +2 \
|
||||||
--submit \
|
--submit \
|
||||||
--project this/project \
|
--project this/project \
|
||||||
$(git rev-list origin/master..HEAD)
|
$(git rev-list origin/master..HEAD)
|
||||||
====
|
----
|
||||||
|
|
||||||
Abandon an active change:
|
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
|
== SEE ALSO
|
||||||
|
|
||||||
|
@@ -102,9 +102,9 @@ This most likely requires double quoting the value, for example
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
Add an email and SSH key to `watcher`'s account:
|
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
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -34,9 +34,9 @@ This command is intended to be used in scripts.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
Change HEAD of project `example` to `stable-2.11` branch:
|
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
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -58,18 +58,18 @@ This command is intended to be used in scripts.
|
|||||||
|
|
||||||
Add alice and bob, but remove eve from the groups my-committers and
|
Add alice and bob, but remove eve from the groups my-committers and
|
||||||
my-verifiers.
|
my-verifiers.
|
||||||
=====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit set-members \
|
$ ssh -p 29418 review.example.com gerrit set-members \
|
||||||
-a alice@example.com -a bob@example.com \
|
-a alice@example.com -a bob@example.com \
|
||||||
-r eve@example.com my-committers my-verifiers
|
-r eve@example.com my-committers my-verifiers
|
||||||
=====
|
----
|
||||||
|
|
||||||
Include the group my-friends into the group my-committers, but
|
Include the group my-friends into the group my-committers, but
|
||||||
exclude the included group my-testers from the group my-committers.
|
exclude the included group my-testers from the group my-committers.
|
||||||
=====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit set-members \
|
$ ssh -p 29418 review.example.com gerrit set-members \
|
||||||
-i my-friends -e my-testers my-committers
|
-i my-friends -e my-testers my-committers
|
||||||
=====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -46,16 +46,16 @@ This command is intended to be used in scripts.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
Configure `kernel/omap` to inherit permissions from `kernel/common`:
|
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`:
|
Reparent all children of `myParent` to `myOtherParent`:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit set-project-parent \
|
$ ssh -p 29418 review.example.com gerrit set-project-parent \
|
||||||
--children-of myParent --parent myOtherParent
|
--children-of myParent --parent myOtherParent
|
||||||
====
|
----
|
||||||
|
|
||||||
== SEE ALSO
|
== SEE ALSO
|
||||||
|
|
||||||
|
@@ -103,10 +103,10 @@ Common unit suffixes of 'k', 'm', or 'g' are supported.
|
|||||||
Change project `example` to be hidden, require change id, don't use content merge
|
Change project `example` to be hidden, require change id, don't use content merge
|
||||||
and use 'merge if necessary' as merge strategy:
|
and use 'merge if necessary' as merge strategy:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit set-project example --submit-type MERGE_IF_NECESSARY\
|
$ ssh -p 29418 review.example.com gerrit set-project example --submit-type MERGE_IF_NECESSARY\
|
||||||
--change-id true --content-merge false --project-state HIDDEN
|
--change-id true --content-merge false --project-state HIDDEN
|
||||||
====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -55,27 +55,27 @@ This command is intended to be used in scripts.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
|
|
||||||
Add reviewers alice and bob, but remove eve from change Iac6b2ac2.
|
Add reviewers alice and bob, but remove eve from change Iac6b2ac2.
|
||||||
=====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit set-reviewers \
|
$ ssh -p 29418 review.example.com gerrit set-reviewers \
|
||||||
-a alice@example.com -a bob@example.com \
|
-a alice@example.com -a bob@example.com \
|
||||||
-r eve@example.com \
|
-r eve@example.com \
|
||||||
Iac6b2ac2
|
Iac6b2ac2
|
||||||
=====
|
----
|
||||||
|
|
||||||
Add reviewer elvis to old-style change id 1935 specifying that the change is in project "graceland"
|
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 \
|
$ ssh -p 29418 review.example.com gerrit set-reviewers \
|
||||||
--project graceland \
|
--project graceland \
|
||||||
-a elvis@example.com \
|
-a elvis@example.com \
|
||||||
1935
|
1935
|
||||||
=====
|
----
|
||||||
|
|
||||||
Add all project owners as reviewers to change Iac6b2ac2.
|
Add all project owners as reviewers to change Iac6b2ac2.
|
||||||
=====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit set-reviewers \
|
$ ssh -p 29418 review.example.com gerrit set-reviewers \
|
||||||
-a "'Project Owners'" \
|
-a "'Project Owners'" \
|
||||||
Iac6b2ac2
|
Iac6b2ac2
|
||||||
=====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -51,7 +51,7 @@ Intended for interactive use only.
|
|||||||
|
|
||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
|
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit show-caches
|
$ ssh -p 29418 review.example.com gerrit show-caches
|
||||||
Gerrit Code Review 2.9 now 11:14:13 CEST
|
Gerrit Code Review 2.9 now 11:14:13 CEST
|
||||||
uptime 6 days 20 hrs
|
uptime 6 days 20 hrs
|
||||||
@@ -90,7 +90,7 @@ Intended for interactive use only.
|
|||||||
107 open files
|
107 open files
|
||||||
|
|
||||||
Threads: 4 CPUs available, 371 threads
|
Threads: 4 CPUs available, 371 threads
|
||||||
====
|
----
|
||||||
|
|
||||||
== SEE ALSO
|
== SEE ALSO
|
||||||
|
|
||||||
|
@@ -62,22 +62,22 @@ Remote Host::
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
|
|
||||||
With reverse DNS lookup (default):
|
With reverse DNS lookup (default):
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit show-connections
|
$ ssh -p 29418 review.example.com gerrit show-connections
|
||||||
Session Start Idle User Remote Host
|
Session Start Idle User Remote Host
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
3abf31e6 20:09:02 00:00:00 jdoe jdoe-desktop.example.com
|
3abf31e6 20:09:02 00:00:00 jdoe jdoe-desktop.example.com
|
||||||
--
|
--
|
||||||
====
|
----
|
||||||
|
|
||||||
Without reverse DNS lookup:
|
Without reverse DNS lookup:
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit show-connections -n
|
$ ssh -p 29418 review.example.com gerrit show-connections -n
|
||||||
Session Start Idle User Remote Host
|
Session Start Idle User Remote Host
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
3abf31e6 20:09:02 00:00:00 a/1001240 10.0.0.1
|
3abf31e6 20:09:02 00:00:00 a/1001240 10.0.0.1
|
||||||
--
|
--
|
||||||
====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -70,7 +70,7 @@ The following queue contains two tasks scheduled to replicate the
|
|||||||
`tools/gerrit.git` project to two different remote systems, `dst1`
|
`tools/gerrit.git` project to two different remote systems, `dst1`
|
||||||
and `dst2`:
|
and `dst2`:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit show-queue
|
$ ssh -p 29418 review.example.com gerrit show-queue
|
||||||
Task State Command
|
Task State Command
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
@@ -78,7 +78,7 @@ and `dst2`:
|
|||||||
9ad09d27 14:31:25.434 mirror dst2:/var/cache/tools/gerrit.git
|
9ad09d27 14:31:25.434 mirror dst2:/var/cache/tools/gerrit.git
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
2 tasks
|
2 tasks
|
||||||
====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -37,18 +37,18 @@ This command is intended to be used in scripts.
|
|||||||
|
|
||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
|
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit stream-events
|
$ ssh -p 29418 review.example.com gerrit stream-events
|
||||||
{"type":"comment-added",change:{"project":"tools/gerrit", ...}, ...}
|
{"type":"comment-added",change:{"project":"tools/gerrit", ...}, ...}
|
||||||
{"type":"comment-added",change:{"project":"tools/gerrit", ...}, ...}
|
{"type":"comment-added",change:{"project":"tools/gerrit", ...}, ...}
|
||||||
====
|
----
|
||||||
|
|
||||||
Only subscribe to specific event types:
|
Only subscribe to specific event types:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit stream-events \
|
$ ssh -p 29418 review.example.com gerrit stream-events \
|
||||||
-s draft-published -s patchset-created -s ref-replicated
|
-s draft-published -s patchset-created -s ref-replicated
|
||||||
====
|
----
|
||||||
|
|
||||||
== SCHEMA
|
== SCHEMA
|
||||||
The JSON messages consist of nested objects referencing the *change*,
|
The JSON messages consist of nested objects referencing the *change*,
|
||||||
|
@@ -48,7 +48,7 @@ This command is intended to be used in scripts.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
|
|
||||||
Approve the change with commit c0ff33 as "Verified +1" as user bob@example.com
|
Approve the change with commit c0ff33 as "Verified +1" as user bob@example.com
|
||||||
=====
|
----
|
||||||
$ sudo -u gerrit ssh -p 29418 \
|
$ sudo -u gerrit ssh -p 29418 \
|
||||||
-i site_path/etc/ssh_host_rsa_key \
|
-i site_path/etc/ssh_host_rsa_key \
|
||||||
"Gerrit Code Review@localhost" \
|
"Gerrit Code Review@localhost" \
|
||||||
@@ -56,7 +56,7 @@ Approve the change with commit c0ff33 as "Verified +1" as user bob@example.com
|
|||||||
--as bob@example.com \
|
--as bob@example.com \
|
||||||
-- \
|
-- \
|
||||||
gerrit approve --verified +1 c0ff33
|
gerrit approve --verified +1 c0ff33
|
||||||
=====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -28,7 +28,7 @@ Can be used by anyone that has permission to read the specified changeset.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
|
|
||||||
Test submit_rule from stdin and return the results as JSON.
|
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
|
cat rules.pl | ssh -p 29418 review.example.com gerrit test-submit rule -s I78f2c6673db24e4e92ed32f604c960dc952437d9
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -38,10 +38,10 @@ Test submit_rule from stdin and return the results as JSON.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
====
|
----
|
||||||
|
|
||||||
Test the active submit_rule from the refs/meta/config branch, ignoring filters in the project parents.
|
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
|
$ ssh -p 29418 review.example.com gerrit test-submit rule I78f2c6673db24e4e92ed32f604c960dc952437d9 --no-filters
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -52,7 +52,7 @@ Test the active submit_rule from the refs/meta/config branch, ignoring filters i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
====
|
----
|
||||||
|
|
||||||
== SCRIPTING
|
== SCRIPTING
|
||||||
Can be used either interactively for testing new prolog submit rules, or from a script to check the submit status of a change.
|
Can be used either interactively for testing new prolog submit rules, or from a script to check the submit status of a change.
|
||||||
|
@@ -28,16 +28,16 @@ Can be used by anyone that has permission to read the specified change.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
|
|
||||||
Test submit_type from stdin and return the submit type.
|
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
|
cat rules.pl | ssh -p 29418 review.example.com gerrit test-submit type -s I78f2c6673db24e4e92ed32f604c960dc952437d9
|
||||||
"MERGE_IF_NECESSARY"
|
"MERGE_IF_NECESSARY"
|
||||||
====
|
----
|
||||||
|
|
||||||
Test the active submit_type from the refs/meta/config branch, ignoring filters in the project parents.
|
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
|
$ ssh -p 29418 review.example.com gerrit test-submit type I78f2c6673db24e4e92ed32f604c960dc952437d9 --no-filters
|
||||||
"MERGE_IF_NECESSARY"
|
"MERGE_IF_NECESSARY"
|
||||||
====
|
----
|
||||||
|
|
||||||
== SCRIPTING
|
== SCRIPTING
|
||||||
Can be used either interactively for testing new prolog submit type, or from a script to check the submit type of a change.
|
Can be used either interactively for testing new prolog submit type, or from a script to check the submit type of a change.
|
||||||
|
@@ -33,10 +33,10 @@ This command is intended to be used in scripts.
|
|||||||
|
|
||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
|
|
||||||
=====
|
----
|
||||||
$ ssh -p 29418 review.example.com gerrit version
|
$ ssh -p 29418 review.example.com gerrit version
|
||||||
gerrit version 2.4.2
|
gerrit version 2.4.2
|
||||||
=====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -12,27 +12,27 @@ permissions work.
|
|||||||
|
|
||||||
To retrieve the `project.config` file, initialize a temporary Git
|
To retrieve the `project.config` file, initialize a temporary Git
|
||||||
repository to edit the configuration:
|
repository to edit the configuration:
|
||||||
====
|
----
|
||||||
mkdir cfg_dir
|
mkdir cfg_dir
|
||||||
cd cfg_dir
|
cd cfg_dir
|
||||||
git init
|
git init
|
||||||
====
|
----
|
||||||
|
|
||||||
Download the existing configuration from Gerrit:
|
Download the existing configuration from Gerrit:
|
||||||
====
|
----
|
||||||
git fetch ssh://localhost:29418/All-Projects refs/meta/config
|
git fetch ssh://localhost:29418/All-Projects refs/meta/config
|
||||||
git checkout FETCH_HEAD
|
git checkout FETCH_HEAD
|
||||||
====
|
----
|
||||||
|
|
||||||
Contributor agreements are defined as contributor-agreement sections in
|
Contributor agreements are defined as contributor-agreement sections in
|
||||||
`project.config`:
|
`project.config`:
|
||||||
====
|
----
|
||||||
[contributor-agreement "Individual"]
|
[contributor-agreement "Individual"]
|
||||||
description = If you are going to be contributing code on your own, this is the one you want. You can sign this one online.
|
description = If you are going to be contributing code on your own, this is the one you want. You can sign this one online.
|
||||||
agreementUrl = static/cla_individual.html
|
agreementUrl = static/cla_individual.html
|
||||||
autoVerify = group CLA Accepted - Individual
|
autoVerify = group CLA Accepted - Individual
|
||||||
accepted = group CLA Accepted - Individual
|
accepted = group CLA Accepted - Individual
|
||||||
====
|
----
|
||||||
|
|
||||||
Each `contributor-agreement` section within the `project.config` file must
|
Each `contributor-agreement` section within the `project.config` file must
|
||||||
have a unique name. The section name will appear in the web UI.
|
have a unique name. The section name will appear in the web UI.
|
||||||
@@ -41,10 +41,10 @@ If not already present, add the UUID of the groups used in the
|
|||||||
`autoVerify` and `accepted` variables in the groups file.
|
`autoVerify` and `accepted` variables in the groups file.
|
||||||
|
|
||||||
Commit the configuration change, and push it back:
|
Commit the configuration change, and push it back:
|
||||||
====
|
----
|
||||||
git commit -a -m "Add Individual contributor agreement"
|
git commit -a -m "Add Individual contributor agreement"
|
||||||
git push ssh://localhost:29418/All-Projects HEAD:refs/meta/config
|
git push ssh://localhost:29418/All-Projects HEAD:refs/meta/config
|
||||||
====
|
----
|
||||||
|
|
||||||
[[contributor-agreement.name.description]]contributor-agreement.<name>.description::
|
[[contributor-agreement.name.description]]contributor-agreement.<name>.description::
|
||||||
+
|
+
|
||||||
|
@@ -16,10 +16,10 @@ installed CGI. This defaults to `/usr/lib/cgi-bin/gitweb.cgi`,
|
|||||||
which is a common installation path for the 'gitweb' package on
|
which is a common installation path for the 'gitweb' package on
|
||||||
Linux distributions.
|
Linux distributions.
|
||||||
|
|
||||||
====
|
----
|
||||||
git config --file $site_path/etc/gerrit.config gitweb.cgi /usr/lib/cgi-bin/gitweb.cgi
|
git config --file $site_path/etc/gerrit.config gitweb.cgi /usr/lib/cgi-bin/gitweb.cgi
|
||||||
git config --file $site_path/etc/gerrit.config --unset gitweb.url
|
git config --file $site_path/etc/gerrit.config --unset gitweb.url
|
||||||
====
|
----
|
||||||
|
|
||||||
Alternatively, if Gerrit is served behind reverse proxy, it can
|
Alternatively, if Gerrit is served behind reverse proxy, it can
|
||||||
generate different URLs for gitweb's links (they need to be
|
generate different URLs for gitweb's links (they need to be
|
||||||
@@ -27,10 +27,10 @@ rewritten to `<gerrit>/gitweb?args` on the web server). This allows
|
|||||||
for serving gitweb under a different URL than the Gerrit instance.
|
for serving gitweb under a different URL than the Gerrit instance.
|
||||||
To enable this feature, set both: `gitweb.cgi` and `gitweb.url`.
|
To enable this feature, set both: `gitweb.cgi` and `gitweb.url`.
|
||||||
|
|
||||||
====
|
----
|
||||||
git config --file $site_path/etc/gerrit.config gitweb.cgi /usr/lib/cgi-bin/gitweb.cgi
|
git config --file $site_path/etc/gerrit.config gitweb.cgi /usr/lib/cgi-bin/gitweb.cgi
|
||||||
git config --file $site_path/etc/gerrit.config gitweb.url /pretty/path/to/gitweb
|
git config --file $site_path/etc/gerrit.config gitweb.url /pretty/path/to/gitweb
|
||||||
====
|
----
|
||||||
|
|
||||||
After updating `'$site_path'/etc/gerrit.config`, the Gerrit server must
|
After updating `'$site_path'/etc/gerrit.config`, the Gerrit server must
|
||||||
be restarted and clients must reload the host page to see the change.
|
be restarted and clients must reload the host page to see the change.
|
||||||
@@ -76,15 +76,15 @@ provides configuration parameters for integration with gitweb.
|
|||||||
|
|
||||||
On Ubuntu:
|
On Ubuntu:
|
||||||
|
|
||||||
====
|
----
|
||||||
sudo apt-get install gitweb
|
$ sudo apt-get install gitweb
|
||||||
====
|
----
|
||||||
|
|
||||||
With Yum:
|
With Yum:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ yum install gitweb
|
$ yum install gitweb
|
||||||
====
|
----
|
||||||
|
|
||||||
===== Configure Gitweb
|
===== Configure Gitweb
|
||||||
|
|
||||||
@@ -124,16 +124,16 @@ $favicon = "git-favicon.png";
|
|||||||
|
|
||||||
Link gitweb to `/var/www/gitweb`, check `/etc/gitweb.conf` if unsure of paths:
|
Link gitweb to `/var/www/gitweb`, check `/etc/gitweb.conf` if unsure of paths:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ sudo ln -s /usr/share/gitweb /var/www/gitweb
|
$ sudo ln -s /usr/share/gitweb /var/www/gitweb
|
||||||
====
|
----
|
||||||
|
|
||||||
Add the gitweb directory to the Apache configuration by creating a "gitweb"
|
Add the gitweb directory to the Apache configuration by creating a "gitweb"
|
||||||
file inside the Apache conf.d directory:
|
file inside the Apache conf.d directory:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ touch /etc/apache/conf.d/gitweb
|
$ touch /etc/apache/conf.d/gitweb
|
||||||
====
|
----
|
||||||
|
|
||||||
Add the following to /etc/apache/conf.d/gitweb:
|
Add the following to /etc/apache/conf.d/gitweb:
|
||||||
|
|
||||||
@@ -150,9 +150,9 @@ is.
|
|||||||
|
|
||||||
===== Restart the Apache Web Server
|
===== Restart the Apache Web Server
|
||||||
|
|
||||||
====
|
----
|
||||||
$ sudo /etc/init.d/apache2 restart
|
$ sudo /etc/init.d/apache2 restart
|
||||||
====
|
----
|
||||||
|
|
||||||
Now you should be able to view your repository projects online:
|
Now you should be able to view your repository projects online:
|
||||||
|
|
||||||
@@ -182,9 +182,9 @@ is broken.. The link:http://groups.google.com/group/msysgit/browse_thread/thread
|
|||||||
verify by checking for perl modules. From an msys console, execute the
|
verify by checking for perl modules. From an msys console, execute the
|
||||||
following to check:
|
following to check:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ perl -mCGI -mEncode -mFcntl -mFile::Find -mFile::Basename -e ""
|
$ perl -mCGI -mEncode -mFcntl -mFile::Find -mFile::Basename -e ""
|
||||||
====
|
----
|
||||||
|
|
||||||
You may encounter the following exception:
|
You may encounter the following exception:
|
||||||
|
|
||||||
|
@@ -90,13 +90,13 @@ expect to use the Verified label to vote on a change after running.
|
|||||||
Administrators can install the Verified label by adding the following
|
Administrators can install the Verified label by adding the following
|
||||||
text to `project.config`:
|
text to `project.config`:
|
||||||
|
|
||||||
====
|
----
|
||||||
[label "Verified"]
|
[label "Verified"]
|
||||||
function = MaxWithBlock
|
function = MaxWithBlock
|
||||||
value = -1 Fails
|
value = -1 Fails
|
||||||
value = 0 No score
|
value = 0 No score
|
||||||
value = +1 Verified
|
value = +1 Verified
|
||||||
====
|
----
|
||||||
|
|
||||||
The range of values is:
|
The range of values is:
|
||||||
|
|
||||||
@@ -323,11 +323,11 @@ Label's applicable scope can be branch specific via configuration.
|
|||||||
E.g. create a label `Video-Qualify` on parent project and configure
|
E.g. create a label `Video-Qualify` on parent project and configure
|
||||||
the `branch` as:
|
the `branch` as:
|
||||||
|
|
||||||
====
|
----
|
||||||
[label "Video-Qualify"]
|
[label "Video-Qualify"]
|
||||||
branch = refs/heads/video-1.0/*
|
branch = refs/heads/video-1.0/*
|
||||||
branch = refs/heads/video-1.1/Kino
|
branch = refs/heads/video-1.1/Kino
|
||||||
====
|
----
|
||||||
|
|
||||||
Then *only* changes in above branch scope of parent project and child
|
Then *only* changes in above branch scope of parent project and child
|
||||||
projects will be affected by `Video-Qualify`.
|
projects will be affected by `Video-Qualify`.
|
||||||
@@ -343,13 +343,13 @@ ignored if the label doesn't apply for that branch.
|
|||||||
To define a new 3-valued category that behaves exactly like `Verified`,
|
To define a new 3-valued category that behaves exactly like `Verified`,
|
||||||
but has different names/labels:
|
but has different names/labels:
|
||||||
|
|
||||||
====
|
----
|
||||||
[label "Copyright-Check"]
|
[label "Copyright-Check"]
|
||||||
function = MaxWithBlock
|
function = MaxWithBlock
|
||||||
value = -1 Do not have copyright
|
value = -1 Do not have copyright
|
||||||
value = 0 No score
|
value = 0 No score
|
||||||
value = +1 Copyright clear
|
value = +1 Copyright clear
|
||||||
====
|
----
|
||||||
|
|
||||||
The new column will appear at the end of the table, and `-1 Do not have
|
The new column will appear at the end of the table, and `-1 Do not have
|
||||||
copyright` will block submit, while `+1 Copyright clear` is required to
|
copyright` will block submit, while `+1 Copyright clear` is required to
|
||||||
@@ -360,7 +360,7 @@ enable submit.
|
|||||||
This example attempts to describe how a label default value works with the
|
This example attempts to describe how a label default value works with the
|
||||||
user permissions. Assume the configuration below.
|
user permissions. Assume the configuration below.
|
||||||
|
|
||||||
====
|
----
|
||||||
[access "refs/heads/*"]
|
[access "refs/heads/*"]
|
||||||
label-Snarky-Review = -3..+3 group Administrators
|
label-Snarky-Review = -3..+3 group Administrators
|
||||||
label-Snarky-Review = -2..+2 group Project Owners
|
label-Snarky-Review = -2..+2 group Project Owners
|
||||||
@@ -374,7 +374,7 @@ user permissions. Assume the configuration below.
|
|||||||
value = +2 Hmm, this is pretty nice
|
value = +2 Hmm, this is pretty nice
|
||||||
value = +3 Ohh, hell yes!
|
value = +3 Ohh, hell yes!
|
||||||
defaultValue = -3
|
defaultValue = -3
|
||||||
====
|
----
|
||||||
|
|
||||||
Upon clicking the Reply button:
|
Upon clicking the Reply button:
|
||||||
|
|
||||||
@@ -386,7 +386,7 @@ Upon clicking the Reply button:
|
|||||||
|
|
||||||
This example shows how a label can be configured to have a standard patch set lock.
|
This example shows how a label can be configured to have a standard patch set lock.
|
||||||
|
|
||||||
====
|
----
|
||||||
[access "refs/heads/*"]
|
[access "refs/heads/*"]
|
||||||
label-Patch-Set-Lock = +0..+1 group Administrators
|
label-Patch-Set-Lock = +0..+1 group Administrators
|
||||||
[label "Patch-Set-Lock"]
|
[label "Patch-Set-Lock"]
|
||||||
@@ -394,7 +394,7 @@ This example shows how a label can be configured to have a standard patch set lo
|
|||||||
value = 0 Patch Set Unlocked
|
value = 0 Patch Set Unlocked
|
||||||
value = +1 Patch Set Locked
|
value = +1 Patch Set Locked
|
||||||
defaultValue = 0
|
defaultValue = 0
|
||||||
====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -10,9 +10,9 @@ By default a new Gerrit installation relies upon OpenID to perform
|
|||||||
user authentication services. To enable OpenID, the auth.type
|
user authentication services. To enable OpenID, the auth.type
|
||||||
setting should be `OpenID`:
|
setting should be `OpenID`:
|
||||||
|
|
||||||
====
|
----
|
||||||
git config --file $site_path/etc/gerrit.config auth.type OpenID
|
git config --file $site_path/etc/gerrit.config auth.type OpenID
|
||||||
====
|
----
|
||||||
|
|
||||||
As this is the default setting there is nothing required from the
|
As this is the default setting there is nothing required from the
|
||||||
site administrator to make use of the OpenID authentication services.
|
site administrator to make use of the OpenID authentication services.
|
||||||
@@ -24,9 +24,9 @@ buffer size parameter, due to very long header lines.
|
|||||||
Add the following to `$JETTY_HOME/etc/jetty.xml` under
|
Add the following to `$JETTY_HOME/etc/jetty.xml` under
|
||||||
`org.mortbay.jetty.nio.SelectChannelConnector`:
|
`org.mortbay.jetty.nio.SelectChannelConnector`:
|
||||||
|
|
||||||
====
|
----
|
||||||
<Set name="headerBufferSize">16384</Set>
|
<Set name="headerBufferSize">16384</Set>
|
||||||
====
|
----
|
||||||
|
|
||||||
In order to use permissions beyond those granted to the
|
In order to use permissions beyond those granted to the
|
||||||
`Anonymous Users` and `Registered Users` groups, an account
|
`Anonymous Users` and `Registered Users` groups, an account
|
||||||
@@ -44,9 +44,9 @@ will match any OpenID provider on the Internet:
|
|||||||
* `https://` -- trust all OpenID providers using the HTTPS protocol
|
* `https://` -- trust all OpenID providers using the HTTPS protocol
|
||||||
|
|
||||||
To trust only Yahoo!:
|
To trust only Yahoo!:
|
||||||
====
|
----
|
||||||
git config --file $site_path/etc/gerrit.config auth.trustedOpenID https://me.yahoo.com
|
git config --file $site_path/etc/gerrit.config auth.trustedOpenID https://me.yahoo.com
|
||||||
====
|
----
|
||||||
|
|
||||||
=== Database Schema
|
=== Database Schema
|
||||||
|
|
||||||
@@ -100,11 +100,11 @@ all requests have already been authenticated. The "Sign In" and
|
|||||||
|
|
||||||
To enable this form of authentication:
|
To enable this form of authentication:
|
||||||
|
|
||||||
====
|
----
|
||||||
git config --file $site_path/etc/gerrit.config auth.type HTTP
|
git config --file $site_path/etc/gerrit.config auth.type HTTP
|
||||||
git config --file $site_path/etc/gerrit.config --unset auth.httpHeader
|
git config --file $site_path/etc/gerrit.config --unset auth.httpHeader
|
||||||
git config --file $site_path/etc/gerrit.config auth.emailFormat '{0}@example.com'
|
git config --file $site_path/etc/gerrit.config auth.emailFormat '{0}@example.com'
|
||||||
====
|
----
|
||||||
|
|
||||||
The auth.type must always be HTTP, indicating the user identity
|
The auth.type must always be HTTP, indicating the user identity
|
||||||
will be obtained from the HTTP authorization data.
|
will be obtained from the HTTP authorization data.
|
||||||
@@ -124,14 +124,14 @@ Apache server will be handling user authentication, a configuration
|
|||||||
such as the following is recommended to ensure Apache performs the
|
such as the following is recommended to ensure Apache performs the
|
||||||
authentication at the proper time:
|
authentication at the proper time:
|
||||||
|
|
||||||
====
|
----
|
||||||
<Location "/login/">
|
<Location "/login/">
|
||||||
AuthType Basic
|
AuthType Basic
|
||||||
AuthName "Gerrit Code Review"
|
AuthName "Gerrit Code Review"
|
||||||
Require valid-user
|
Require valid-user
|
||||||
...
|
...
|
||||||
</Location>
|
</Location>
|
||||||
====
|
----
|
||||||
|
|
||||||
=== Database Schema
|
=== Database Schema
|
||||||
|
|
||||||
@@ -161,11 +161,11 @@ all requests have already been authenticated. The "Sign In" and
|
|||||||
|
|
||||||
To enable this form of authentication:
|
To enable this form of authentication:
|
||||||
|
|
||||||
====
|
----
|
||||||
git config --file $site_path/etc/gerrit.config auth.type HTTP
|
git config --file $site_path/etc/gerrit.config auth.type HTTP
|
||||||
git config --file $site_path/etc/gerrit.config auth.httpHeader SM_USER
|
git config --file $site_path/etc/gerrit.config auth.httpHeader SM_USER
|
||||||
git config --file $site_path/etc/gerrit.config auth.emailFormat '{0}@example.com'
|
git config --file $site_path/etc/gerrit.config auth.emailFormat '{0}@example.com'
|
||||||
====
|
----
|
||||||
|
|
||||||
The auth.type must always be HTTP, indicating the user identity
|
The auth.type must always be HTTP, indicating the user identity
|
||||||
will be obtained from the HTTP authorization data.
|
will be obtained from the HTTP authorization data.
|
||||||
@@ -186,9 +186,9 @@ buffer size parameter, due to very long header lines.
|
|||||||
Add the following to `$JETTY_HOME/etc/jetty.xml` under
|
Add the following to `$JETTY_HOME/etc/jetty.xml` under
|
||||||
`org.mortbay.jetty.nio.SelectChannelConnector`:
|
`org.mortbay.jetty.nio.SelectChannelConnector`:
|
||||||
|
|
||||||
====
|
----
|
||||||
<Set name="headerBufferSize">16384</Set>
|
<Set name="headerBufferSize">16384</Set>
|
||||||
====
|
----
|
||||||
|
|
||||||
|
|
||||||
=== Database Schema
|
=== Database Schema
|
||||||
|
@@ -88,7 +88,7 @@ reference the new image path.
|
|||||||
To connect Gerrit to Google Analytics add the following to your
|
To connect Gerrit to Google Analytics add the following to your
|
||||||
`GerritSiteFooter.html`:
|
`GerritSiteFooter.html`:
|
||||||
|
|
||||||
====
|
----
|
||||||
<div>
|
<div>
|
||||||
<!-- standard analytics code -->
|
<!-- standard analytics code -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@@ -110,7 +110,7 @@ To connect Gerrit to Google Analytics add the following to your
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
====
|
----
|
||||||
|
|
||||||
Please consult the Google Analytics documentation for the correct
|
Please consult the Google Analytics documentation for the correct
|
||||||
setup code (the first two script tags). The above is shown only
|
setup code (the first two script tags). The above is shown only
|
||||||
|
@@ -90,11 +90,11 @@ gerrit-plugin-api.jar::
|
|||||||
Plugins may provide optional description information with standard
|
Plugins may provide optional description information with standard
|
||||||
manifest fields:
|
manifest fields:
|
||||||
|
|
||||||
====
|
----
|
||||||
Implementation-Title: Example plugin showing examples
|
Implementation-Title: Example plugin showing examples
|
||||||
Implementation-Version: 1.0
|
Implementation-Version: 1.0
|
||||||
Implementation-Vendor: Example, Inc.
|
Implementation-Vendor: Example, Inc.
|
||||||
====
|
----
|
||||||
|
|
||||||
=== ApiType
|
=== ApiType
|
||||||
|
|
||||||
@@ -104,9 +104,9 @@ internals. If no `Gerrit-ApiType` is specified the stable `extension`
|
|||||||
API will be assumed. This may cause ClassNotFoundExceptions when
|
API will be assumed. This may cause ClassNotFoundExceptions when
|
||||||
loading a plugin that needs the plugin API.
|
loading a plugin that needs the plugin API.
|
||||||
|
|
||||||
====
|
----
|
||||||
Gerrit-ApiType: plugin
|
Gerrit-ApiType: plugin
|
||||||
====
|
----
|
||||||
|
|
||||||
=== Explicit Registration
|
=== Explicit Registration
|
||||||
|
|
||||||
@@ -119,20 +119,20 @@ server (if enabled). If no modules are named automatic registration
|
|||||||
will be performed by scanning all classes in the plugin JAR for
|
will be performed by scanning all classes in the plugin JAR for
|
||||||
`@Listen` and `@Export("")` annotations.
|
`@Listen` and `@Export("")` annotations.
|
||||||
|
|
||||||
====
|
----
|
||||||
Gerrit-Module: tld.example.project.CoreModuleClassName
|
Gerrit-Module: tld.example.project.CoreModuleClassName
|
||||||
Gerrit-SshModule: tld.example.project.SshModuleClassName
|
Gerrit-SshModule: tld.example.project.SshModuleClassName
|
||||||
Gerrit-HttpModule: tld.example.project.HttpModuleClassName
|
Gerrit-HttpModule: tld.example.project.HttpModuleClassName
|
||||||
====
|
----
|
||||||
|
|
||||||
[[plugin_name]]
|
[[plugin_name]]
|
||||||
=== Plugin Name
|
=== Plugin Name
|
||||||
|
|
||||||
A plugin can optionally provide its own plugin name.
|
A plugin can optionally provide its own plugin name.
|
||||||
|
|
||||||
====
|
----
|
||||||
Gerrit-PluginName: replication
|
Gerrit-PluginName: replication
|
||||||
====
|
----
|
||||||
|
|
||||||
This is useful for plugins that contribute plugin-owned capabilities that
|
This is useful for plugins that contribute plugin-owned capabilities that
|
||||||
are stored in the `project.config` file. Another use case is to be able to put
|
are stored in the `project.config` file. Another use case is to be able to put
|
||||||
@@ -216,9 +216,9 @@ to be `restart`. Otherwise the preferred method of `reload` will
|
|||||||
be used, as it enables the server to hot-patch an updated plugin
|
be used, as it enables the server to hot-patch an updated plugin
|
||||||
with no down time.
|
with no down time.
|
||||||
|
|
||||||
====
|
----
|
||||||
Gerrit-ReloadMode: restart
|
Gerrit-ReloadMode: restart
|
||||||
====
|
----
|
||||||
|
|
||||||
In either mode ('restart' or 'reload') any plugin or extension can
|
In either mode ('restart' or 'reload') any plugin or extension can
|
||||||
be updated without restarting the Gerrit server. The difference is
|
be updated without restarting the Gerrit server. The difference is
|
||||||
@@ -259,9 +259,9 @@ For instance plugins to integrate Jira issues to Gerrit changes may
|
|||||||
contribute their own "init step" to allow configuring the Jira URL,
|
contribute their own "init step" to allow configuring the Jira URL,
|
||||||
credentials and possibly verify connectivity to validate them.
|
credentials and possibly verify connectivity to validate them.
|
||||||
|
|
||||||
====
|
----
|
||||||
Gerrit-InitStep: tld.example.project.MyInitStep
|
Gerrit-InitStep: tld.example.project.MyInitStep
|
||||||
====
|
----
|
||||||
|
|
||||||
MyInitStep needs to follow the standard Gerrit InitStep syntax
|
MyInitStep needs to follow the standard Gerrit InitStep syntax
|
||||||
and behavior: writing to the console using the injected ConsoleUI
|
and behavior: writing to the console using the injected ConsoleUI
|
||||||
@@ -1355,13 +1355,13 @@ A new button is placed on the popup dialog to actually send the request.
|
|||||||
Every `UiAction` exposes a REST API endpoint. The endpoint from the example above
|
Every `UiAction` exposes a REST API endpoint. The endpoint from the example above
|
||||||
can be accessed from any REST client, i. e.:
|
can be accessed from any REST client, i. e.:
|
||||||
|
|
||||||
====
|
----
|
||||||
curl -X POST -H "Content-Type: application/json" \
|
curl -X POST -H "Content-Type: application/json" \
|
||||||
-d '{message: "François", french: true}' \
|
-d '{message: "François", french: true}' \
|
||||||
--digest --user joe:secret \
|
--digest --user joe:secret \
|
||||||
http://host:port/a/changes/1/revisions/1/cookbook~say-hello
|
http://host:port/a/changes/1/revisions/1/cookbook~say-hello
|
||||||
"Bonjour François from change 1, patch set 1!"
|
"Bonjour François from change 1, patch set 1!"
|
||||||
====
|
----
|
||||||
|
|
||||||
A special case is to bind an endpoint without a view name. This is
|
A special case is to bind an endpoint without a view name. This is
|
||||||
particularly useful for `DELETE` requests:
|
particularly useful for `DELETE` requests:
|
||||||
|
@@ -6,9 +6,9 @@
|
|||||||
* Build the latest snapshot and install it into the local Maven
|
* Build the latest snapshot and install it into the local Maven
|
||||||
repository:
|
repository:
|
||||||
+
|
+
|
||||||
====
|
----
|
||||||
mvn clean install
|
mvn clean install
|
||||||
====
|
----
|
||||||
|
|
||||||
* Test Gerrit with this snapshot locally
|
* Test Gerrit with this snapshot locally
|
||||||
|
|
||||||
@@ -27,9 +27,9 @@ Configuration for Subprojects in `pom.xml`]
|
|||||||
|
|
||||||
* Deploy the new snapshot:
|
* Deploy the new snapshot:
|
||||||
+
|
+
|
||||||
====
|
----
|
||||||
mvn deploy
|
mvn deploy
|
||||||
====
|
----
|
||||||
|
|
||||||
* Change the `id`, `bin_sha1`, and `src_sha1` values in the `maven_jar`
|
* Change the `id`, `bin_sha1`, and `src_sha1` values in the `maven_jar`
|
||||||
for the subproject in `/lib/BUCK` to the `SNAPSHOT` version.
|
for the subproject in `/lib/BUCK` to the `SNAPSHOT` version.
|
||||||
@@ -50,15 +50,15 @@ below)
|
|||||||
|
|
||||||
* Create the Release Tag
|
* Create the Release Tag
|
||||||
+
|
+
|
||||||
====
|
----
|
||||||
git tag -a -m "prolog-cafe 1.3" v1.3
|
git tag -a -m "prolog-cafe 1.3" v1.3
|
||||||
====
|
----
|
||||||
|
|
||||||
* Build and install into local Maven repository:
|
* Build and install into local Maven repository:
|
||||||
+
|
+
|
||||||
====
|
----
|
||||||
mvn clean install
|
mvn clean install
|
||||||
====
|
----
|
||||||
|
|
||||||
|
|
||||||
[[publish-release]]
|
[[publish-release]]
|
||||||
@@ -72,18 +72,18 @@ link:dev-release-deploy-config.html#deploy-configuration-subprojects[subprojects
|
|||||||
|
|
||||||
* Deploy the new release:
|
* Deploy the new release:
|
||||||
+
|
+
|
||||||
====
|
----
|
||||||
mvn deploy
|
mvn deploy
|
||||||
====
|
----
|
||||||
|
|
||||||
* Push the pom change(s) to the project's repository
|
* Push the pom change(s) to the project's repository
|
||||||
`refs/for/<master|stable>`
|
`refs/for/<master|stable>`
|
||||||
|
|
||||||
* Push the Release Tag
|
* Push the Release Tag
|
||||||
+
|
+
|
||||||
====
|
----
|
||||||
git push gerrit-review refs/tags/v1.3:refs/tags/v1.3
|
git push gerrit-review refs/tags/v1.3:refs/tags/v1.3
|
||||||
====
|
----
|
||||||
|
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
|
@@ -358,20 +358,15 @@ homepage project] to change the version numbers to the new version.
|
|||||||
[[update-issues]]
|
[[update-issues]]
|
||||||
==== Update the Issues
|
==== Update the Issues
|
||||||
|
|
||||||
====
|
Update the issues by hand. There is no script for this.
|
||||||
How do the issues get updated? Do you run a script to do
|
|
||||||
this? When do you do it, after the final 2.5 is released?
|
|
||||||
====
|
|
||||||
|
|
||||||
By hand.
|
|
||||||
|
|
||||||
Our current process is an issue should be updated to say `Status =
|
Our current process is an issue should be updated to say `Status =
|
||||||
Submitted, FixedIn-2.5` once the change is submitted, but before the
|
Submitted, FixedIn-2.5` once the change is submitted, but before the
|
||||||
release.
|
release.
|
||||||
|
|
||||||
After the release is actually made, you can search in Google Code for
|
After the release is actually made, you can search in Google Code for
|
||||||
``Status=Submitted FixedIn=2.5'' and then batch update these changes
|
`Status=Submitted FixedIn=2.5` and then batch update these changes
|
||||||
to say `Status=Released`. Make sure the pulldown says ``All Issues''
|
to say `Status=Released`. Make sure the pulldown says `All Issues`
|
||||||
because `Status=Submitted` is considered a closed issue.
|
because `Status=Submitted` is considered a closed issue.
|
||||||
|
|
||||||
|
|
||||||
|
@@ -137,11 +137,11 @@ if existing Git repositories were not imported during 'init'.
|
|||||||
To control the Gerrit Code Review daemon that is running in the
|
To control the Gerrit Code Review daemon that is running in the
|
||||||
background, use the rc.d style start script created by 'init':
|
background, use the rc.d style start script created by 'init':
|
||||||
|
|
||||||
====
|
----
|
||||||
review_site/bin/gerrit.sh start
|
review_site/bin/gerrit.sh start
|
||||||
review_site/bin/gerrit.sh stop
|
review_site/bin/gerrit.sh stop
|
||||||
review_site/bin/gerrit.sh restart
|
review_site/bin/gerrit.sh restart
|
||||||
====
|
----
|
||||||
|
|
||||||
('Optional') Configure the daemon to automatically start and stop
|
('Optional') Configure the daemon to automatically start and stop
|
||||||
with the operating system.
|
with the operating system.
|
||||||
@@ -149,18 +149,18 @@ with the operating system.
|
|||||||
Uncomment the following 3 lines in the `'$site_path/bin/gerrit.sh'`
|
Uncomment the following 3 lines in the `'$site_path/bin/gerrit.sh'`
|
||||||
script:
|
script:
|
||||||
|
|
||||||
====
|
----
|
||||||
chkconfig: 3 99 99
|
chkconfig: 3 99 99
|
||||||
description: Gerrit Code Review
|
description: Gerrit Code Review
|
||||||
processname: gerrit
|
processname: gerrit
|
||||||
====
|
----
|
||||||
|
|
||||||
Then link the `gerrit.sh` script into `rc3.d`:
|
Then link the `gerrit.sh` script into `rc3.d`:
|
||||||
|
|
||||||
====
|
----
|
||||||
sudo ln -snf `pwd`/review_site/bin/gerrit.sh /etc/init.d/gerrit
|
sudo ln -snf `pwd`/review_site/bin/gerrit.sh /etc/init.d/gerrit
|
||||||
sudo ln -snf /etc/init.d/gerrit /etc/rc3.d/S90gerrit
|
sudo ln -snf /etc/init.d/gerrit /etc/rc3.d/S90gerrit
|
||||||
====
|
----
|
||||||
|
|
||||||
('Optional') To enable autocompletion of the gerrit.sh commands, install
|
('Optional') To enable autocompletion of the gerrit.sh commands, install
|
||||||
autocompletion from the `/contrib/bash_completion` script. Refer to the
|
autocompletion from the `/contrib/bash_completion` script. Refer to the
|
||||||
|
@@ -69,11 +69,11 @@ Web UI. Otherwise you may inspect the history locally. If you have
|
|||||||
cloned the repository you can do this by executing the following
|
cloned the repository you can do this by executing the following
|
||||||
commands:
|
commands:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ git fetch origin refs/meta/config:config
|
$ git fetch origin refs/meta/config:config
|
||||||
$ git checkout config
|
$ git checkout config
|
||||||
$ git log project.config
|
$ git log project.config
|
||||||
====
|
----
|
||||||
|
|
||||||
Non project owners may still edit the access rights and propose the
|
Non project owners may still edit the access rights and propose the
|
||||||
modifications to the project owners by clicking on the `Save for
|
modifications to the project owners by clicking on the `Save for
|
||||||
@@ -519,11 +519,11 @@ Often comment links are used to link an ID in a commit message footer
|
|||||||
to an issue in an issue tracker system. For example, to link the ID
|
to an issue in an issue tracker system. For example, to link the ID
|
||||||
from the `Bug` footer to Jira the following configuration can be used:
|
from the `Bug` footer to Jira the following configuration can be used:
|
||||||
|
|
||||||
====
|
----
|
||||||
[commentlink "myjira"]
|
[commentlink "myjira"]
|
||||||
match = ([Bb][Uu][Gg]:\\s+)(\\S+)
|
match = ([Bb][Uu][Gg]:\\s+)(\\S+)
|
||||||
link = https://myjira/browse/$2
|
link = https://myjira/browse/$2
|
||||||
====
|
----
|
||||||
|
|
||||||
[[reviewers]]
|
[[reviewers]]
|
||||||
== Reviewers
|
== Reviewers
|
||||||
@@ -594,11 +594,11 @@ build, execute the tests or even do a deployment.
|
|||||||
The project-specific download commands must be configured in the
|
The project-specific download commands must be configured in the
|
||||||
`project.config` file in the `refs/meta/config` branch of the project:
|
`project.config` file in the `refs/meta/config` branch of the project:
|
||||||
+
|
+
|
||||||
====
|
----
|
||||||
[plugin "project-download-commands"]
|
[plugin "project-download-commands"]
|
||||||
Build = git fetch ${url} ${ref} && git checkout FETCH_HEAD && buck build ${project}
|
Build = git fetch ${url} ${ref} && git checkout FETCH_HEAD && buck build ${project}
|
||||||
Update = git fetch ${url} ${ref} && git checkout FETCH_HEAD && git submodule update
|
Update = git fetch ${url} ${ref} && git checkout FETCH_HEAD && git submodule update
|
||||||
====
|
----
|
||||||
+
|
+
|
||||||
Project-specific download commands that are defined on a parent project
|
Project-specific download commands that are defined on a parent project
|
||||||
are inherited by the child projects. A child project can overwrite an
|
are inherited by the child projects. A child project can overwrite an
|
||||||
@@ -705,9 +705,9 @@ git filter-branch] command to rewrite the committer information for all
|
|||||||
commits (the author information that records who was writing the code
|
commits (the author information that records who was writing the code
|
||||||
stays intact; signed tags will lose their signature):
|
stays intact; signed tags will lose their signature):
|
||||||
|
|
||||||
====
|
----
|
||||||
$ git filter-branch --tag-name-filter cat --env-filter 'GIT_COMMITTER_NAME="John Doe"; GIT_COMMITTER_EMAIL="john.doe@example.com";' -- --all
|
$ git filter-branch --tag-name-filter cat --env-filter 'GIT_COMMITTER_NAME="John Doe"; GIT_COMMITTER_EMAIL="john.doe@example.com";' -- --all
|
||||||
====
|
----
|
||||||
|
|
||||||
If a link:config-gerrit.html#receive.maxObjectSizeLimit[max object size
|
If a link:config-gerrit.html#receive.maxObjectSizeLimit[max object size
|
||||||
limit] is configured on the server you may need to remove large objects
|
limit] is configured on the server you may need to remove large objects
|
||||||
@@ -715,20 +715,22 @@ from the history before you are able to push. To find large objects in
|
|||||||
the history of your project you can use the `reposize.sh` script which
|
the history of your project you can use the `reposize.sh` script which
|
||||||
you can download from Gerrit:
|
you can download from Gerrit:
|
||||||
|
|
||||||
|
----
|
||||||
$ curl -Lo reposize.sh http://review.example.com:8080/tools/scripts/reposize.sh
|
$ curl -Lo reposize.sh http://review.example.com:8080/tools/scripts/reposize.sh
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
$ scp -p -P 29418 john.doe@review.example.com:scripts/reposize.sh .
|
$ scp -p -P 29418 john.doe@review.example.com:scripts/reposize.sh .
|
||||||
|
----
|
||||||
|
|
||||||
You can then use the
|
You can then use the
|
||||||
link:https://www.kernel.org/pub/software/scm/git/docs/git-filter-branch.html[
|
link:https://www.kernel.org/pub/software/scm/git/docs/git-filter-branch.html[
|
||||||
git filter-branch] command to remove the large objects from the history
|
git filter-branch] command to remove the large objects from the history
|
||||||
of all branches:
|
of all branches:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch path/to/large-file.jar' -- --all
|
$ git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch path/to/large-file.jar' -- --all
|
||||||
====
|
----
|
||||||
|
|
||||||
Since this command rewrites all commits in the repository it's a good
|
Since this command rewrites all commits in the repository it's a good
|
||||||
idea to create a fresh clone from this rewritten repository before
|
idea to create a fresh clone from this rewritten repository before
|
||||||
|
@@ -48,9 +48,9 @@ connectivity to the metadata database.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
To convert the local username of every account to lower case:
|
To convert the local username of every account to lower case:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ java -jar gerrit.war LocalUsernamesToLowerCase -d site_path
|
$ java -jar gerrit.war LocalUsernamesToLowerCase -d site_path
|
||||||
====
|
----
|
||||||
|
|
||||||
== SEE ALSO
|
== SEE ALSO
|
||||||
|
|
||||||
|
@@ -32,7 +32,7 @@ managed Git repositories.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
To manually correct a user's SSH user name:
|
To manually correct a user's SSH user name:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ java -jar gerrit.war gsql
|
$ java -jar gerrit.war gsql
|
||||||
Welcome to Gerrit Code Review v2.0.25
|
Welcome to Gerrit Code Review v2.0.25
|
||||||
(PostgreSQL 8.3.8)
|
(PostgreSQL 8.3.8)
|
||||||
@@ -43,7 +43,7 @@ To manually correct a user's SSH user name:
|
|||||||
UPDATE 1; 1 ms
|
UPDATE 1; 1 ms
|
||||||
gerrit> \q
|
gerrit> \q
|
||||||
Bye
|
Bye
|
||||||
====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -22,7 +22,7 @@ and testing.
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
Define a simple predicate and test it:
|
Define a simple predicate and test it:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ cat >simple.pl
|
$ cat >simple.pl
|
||||||
food(apple).
|
food(apple).
|
||||||
food(orange).
|
food(orange).
|
||||||
@@ -45,7 +45,7 @@ Define a simple predicate and test it:
|
|||||||
|
|
||||||
no
|
no
|
||||||
| ?-
|
| ?-
|
||||||
====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -39,9 +39,9 @@ link:config-gerrit.html#cache.directory[cache.directory].
|
|||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
To compile a rule JAR file for test/project:
|
To compile a rule JAR file for test/project:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ java -jar gerrit.war rulec -d site_path test/project
|
$ java -jar gerrit.war rulec -d site_path test/project
|
||||||
====
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
@@ -22,9 +22,9 @@ manually].
|
|||||||
|
|
||||||
. Create a Git repository under `gerrit.basePath`:
|
. Create a Git repository under `gerrit.basePath`:
|
||||||
+
|
+
|
||||||
====
|
----
|
||||||
git --git-dir=$base_path/new/project.git init
|
git --git-dir=$base_path/new/project.git init
|
||||||
====
|
----
|
||||||
+
|
+
|
||||||
[TIP]
|
[TIP]
|
||||||
By tradition the repository directory name should have a `.git`
|
By tradition the repository directory name should have a `.git`
|
||||||
@@ -33,17 +33,17 @@ suffix.
|
|||||||
To also make this repository available over the anonymous git://
|
To also make this repository available over the anonymous git://
|
||||||
protocol, don't forget to create a `git-daemon-export-ok` file:
|
protocol, don't forget to create a `git-daemon-export-ok` file:
|
||||||
+
|
+
|
||||||
====
|
----
|
||||||
touch $base_path/new/project.git/git-daemon-export-ok
|
touch $base_path/new/project.git/git-daemon-export-ok
|
||||||
====
|
----
|
||||||
|
|
||||||
. Register Project
|
. Register Project
|
||||||
+
|
+
|
||||||
Either restart the server, or flush the `project_list` cache:
|
Either restart the server, or flush the `project_list` cache:
|
||||||
+
|
+
|
||||||
====
|
----
|
||||||
ssh -p 29418 localhost gerrit flush-caches --cache project_list
|
ssh -p 29418 localhost gerrit flush-caches --cache project_list
|
||||||
====
|
----
|
||||||
|
|
||||||
[[project_options]]
|
[[project_options]]
|
||||||
== Project Options
|
== Project Options
|
||||||
@@ -262,9 +262,9 @@ There are several ways to delete a branch:
|
|||||||
REST endpoint
|
REST endpoint
|
||||||
- by using a git client to force push nothing to an existing branch
|
- by using a git client to force push nothing to an existing branch
|
||||||
+
|
+
|
||||||
====
|
----
|
||||||
$ git push --force origin :refs/heads/<branch-to-delete>
|
$ git push --force origin :refs/heads/<branch-to-delete>
|
||||||
====
|
----
|
||||||
|
|
||||||
To be able to delete branches, the user must have the
|
To be able to delete branches, the user must have the
|
||||||
link:access-control.html#category_push[Push] access right with the
|
link:access-control.html#category_push[Push] access right with the
|
||||||
|
@@ -92,14 +92,14 @@ Project specific submit rules are stored in the `rules.pl` file in the
|
|||||||
checkout the `refs/meta/config` branch in order to create or edit the `rules.pl`
|
checkout the `refs/meta/config` branch in order to create or edit the `rules.pl`
|
||||||
file:
|
file:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ git fetch origin refs/meta/config:config
|
$ git fetch origin refs/meta/config:config
|
||||||
$ git checkout config
|
$ git checkout config
|
||||||
... edit or create the rules.pl file
|
... edit or create the rules.pl file
|
||||||
$ git add rules.pl
|
$ git add rules.pl
|
||||||
$ git commit -m "My submit rules"
|
$ git commit -m "My submit rules"
|
||||||
$ git push origin HEAD:refs/meta/config
|
$ git push origin HEAD:refs/meta/config
|
||||||
====
|
----
|
||||||
|
|
||||||
[[HowToWriteSubmitRules]]
|
[[HowToWriteSubmitRules]]
|
||||||
== How to write submit rules
|
== How to write submit rules
|
||||||
@@ -113,14 +113,14 @@ Conceptually we can imagine that Gerrit adds a set of facts about the change
|
|||||||
`C` on top of the `rules.pl` file and then consults it. The set of facts about
|
`C` on top of the `rules.pl` file and then consults it. The set of facts about
|
||||||
the change `C` will look like:
|
the change `C` will look like:
|
||||||
|
|
||||||
====
|
----
|
||||||
:- package gerrit. <1>
|
:- package gerrit. <1>
|
||||||
|
|
||||||
commit_author(user(1000000), 'John Doe', 'john.doe@example.com'). <2>
|
commit_author(user(1000000), 'John Doe', 'john.doe@example.com'). <2>
|
||||||
commit_committer(user(1000000), 'John Doe', 'john.doe@example.com'). <3>
|
commit_committer(user(1000000), 'John Doe', 'john.doe@example.com'). <3>
|
||||||
commit_message('Add plugin support to Gerrit'). <4>
|
commit_message('Add plugin support to Gerrit'). <4>
|
||||||
...
|
...
|
||||||
====
|
----
|
||||||
|
|
||||||
<1> Gerrit will provide its facts in a package named `gerrit`. This means we
|
<1> Gerrit will provide its facts in a package named `gerrit`. This means we
|
||||||
have to use qualified names when writing our code and referencing these facts.
|
have to use qualified names when writing our code and referencing these facts.
|
||||||
@@ -139,9 +139,9 @@ needed criteria for the change to become submittable. This means that Gerrit has
|
|||||||
an expectation on the format and value of the result of the `submit_rule`
|
an expectation on the format and value of the result of the `submit_rule`
|
||||||
predicate which is expected to be a `submit` term of the following format:
|
predicate which is expected to be a `submit` term of the following format:
|
||||||
|
|
||||||
====
|
----
|
||||||
submit(label(label-name, status) [, label(label-name, status)]*)
|
submit(label(label-name, status) [, label(label-name, status)]*)
|
||||||
====
|
----
|
||||||
|
|
||||||
where `label-name` is usually `'Code-Review'` or `'Verified'` but could also
|
where `label-name` is usually `'Code-Review'` or `'Verified'` but could also
|
||||||
be any other string (see examples below). The `status` is one of:
|
be any other string (see examples below). The `status` is one of:
|
||||||
@@ -173,11 +173,11 @@ needed for the change to become submittable.
|
|||||||
|
|
||||||
Here some examples of possible return values from the `submit_rule` predicate:
|
Here some examples of possible return values from the `submit_rule` predicate:
|
||||||
|
|
||||||
====
|
----
|
||||||
submit(label('Code-Review', ok(_))) <1>
|
submit(label('Code-Review', ok(_))) <1>
|
||||||
submit(label('Code-Review', ok(_)), label('Verified', reject(_))) <2>
|
submit(label('Code-Review', ok(_)), label('Verified', reject(_))) <2>
|
||||||
submit(label('Author-is-John-Doe', need(_)) <3>
|
submit(label('Author-is-John-Doe', need(_)) <3>
|
||||||
====
|
----
|
||||||
|
|
||||||
<1> label `'Code-Review'` is met. As there are no other labels in the
|
<1> label `'Code-Review'` is met. As there are no other labels in the
|
||||||
return result, the change is submittable.
|
return result, the change is submittable.
|
||||||
@@ -217,10 +217,9 @@ The purpose of the submit filter is, as its name says, to filter the results
|
|||||||
of the `submit_rule`. Therefore, the `submit_filter` predicate has two
|
of the `submit_rule`. Therefore, the `submit_filter` predicate has two
|
||||||
parameters:
|
parameters:
|
||||||
|
|
||||||
====
|
----
|
||||||
submit_filter(In, Out) :- ...
|
submit_filter(In, Out) :- ...
|
||||||
====
|
----
|
||||||
|
|
||||||
Gerrit will invoke `submit_filter` with the `In` parameter containing a `submit`
|
Gerrit will invoke `submit_filter` with the `In` parameter containing a `submit`
|
||||||
structure produced by the `submit_rule` and will take the value of the `Out`
|
structure produced by the `submit_rule` and will take the value of the `Out`
|
||||||
parameter as the result.
|
parameter as the result.
|
||||||
@@ -240,7 +239,7 @@ can avoid implementing the same `submit_rule` in all their projects.
|
|||||||
|
|
||||||
The following "drawing" illustrates the order of the invocation and the chaining
|
The following "drawing" illustrates the order of the invocation and the chaining
|
||||||
of the results of the `submit_rule` and `submit_filter` predicates.
|
of the results of the `submit_rule` and `submit_filter` predicates.
|
||||||
====
|
----
|
||||||
All-Projects
|
All-Projects
|
||||||
^ submit_filter(B, S) :- ... <4>
|
^ submit_filter(B, S) :- ... <4>
|
||||||
|
|
|
|
||||||
@@ -255,7 +254,7 @@ of the results of the `submit_rule` and `submit_filter` predicates.
|
|||||||
|
|
|
|
||||||
MyProject
|
MyProject
|
||||||
submit_rule(X) :- ... <1>
|
submit_rule(X) :- ... <1>
|
||||||
====
|
----
|
||||||
|
|
||||||
<1> The `submit_rule` of `MyProject` is invoked first.
|
<1> The `submit_rule` of `MyProject` is invoked first.
|
||||||
<2> The result `X` is filtered through the `submit_filter` from the `Parent-1`
|
<2> The result `X` is filtered through the `submit_filter` from the `Parent-1`
|
||||||
@@ -289,9 +288,9 @@ represents one of the supported submit types:
|
|||||||
Submit type filter works the same way as the xref:SubmitFilter[Submit Filter]
|
Submit type filter works the same way as the xref:SubmitFilter[Submit Filter]
|
||||||
where the name of the filter predicate is `submit_type_filter`.
|
where the name of the filter predicate is `submit_type_filter`.
|
||||||
|
|
||||||
====
|
----
|
||||||
submit_type_filter(In, Out).
|
submit_type_filter(In, Out).
|
||||||
====
|
----
|
||||||
|
|
||||||
Gerrit will invoke `submit_type_filter` with the `In` parameter containing a
|
Gerrit will invoke `submit_type_filter` with the `In` parameter containing a
|
||||||
result of the `submit_type` and will take the value of the `Out` parameter as
|
result of the `submit_type` and will take the value of the `Out` parameter as
|
||||||
@@ -306,9 +305,9 @@ command link:cmd-test-submit-rule.html[test-submit rule] loads a specific change
|
|||||||
and executes the `submit_rule`. It optionally reads the rule from from `stdin`
|
and executes the `submit_rule`. It optionally reads the rule from from `stdin`
|
||||||
to facilitate easy testing.
|
to facilitate easy testing.
|
||||||
|
|
||||||
====
|
----
|
||||||
$ cat rules.pl | ssh gerrit_srv gerrit test-submit rule I45e080b105a50a625cc8e1fb5b357c0bfabe6d68 -s
|
$ cat rules.pl | ssh gerrit_srv gerrit test-submit rule I45e080b105a50a625cc8e1fb5b357c0bfabe6d68 -s
|
||||||
====
|
----
|
||||||
|
|
||||||
== Prolog vs Gerrit plugin for project specific submit rules
|
== Prolog vs Gerrit plugin for project specific submit rules
|
||||||
Since version 2.5 Gerrit supports plugins and extension points. A plugin or an
|
Since version 2.5 Gerrit supports plugins and extension points. A plugin or an
|
||||||
|
@@ -45,24 +45,24 @@ branch. Consult link:access-control.html[access controls] for
|
|||||||
details on how access permissions work.
|
details on how access permissions work.
|
||||||
|
|
||||||
Initialize a temporary Git repository to edit the configuration:
|
Initialize a temporary Git repository to edit the configuration:
|
||||||
====
|
----
|
||||||
mkdir cfg_dir
|
mkdir cfg_dir
|
||||||
cd cfg_dir
|
cd cfg_dir
|
||||||
git init
|
git init
|
||||||
====
|
----
|
||||||
|
|
||||||
Download the existing configuration from Gerrit:
|
Download the existing configuration from Gerrit:
|
||||||
====
|
----
|
||||||
git fetch ssh://localhost:29418/project refs/meta/config
|
git fetch ssh://localhost:29418/project refs/meta/config
|
||||||
git checkout FETCH_HEAD
|
git checkout FETCH_HEAD
|
||||||
====
|
----
|
||||||
|
|
||||||
Enable notifications to an email address by adding to
|
Enable notifications to an email address by adding to
|
||||||
`project.config`, this can be done using the `git config` command:
|
`project.config`, this can be done using the `git config` command:
|
||||||
====
|
----
|
||||||
git config -f project.config --add notify.team.email team-address@example.com
|
git config -f project.config --add notify.team.email team-address@example.com
|
||||||
git config -f project.config --add notify.team.email paranoid-manager@example.com
|
git config -f project.config --add notify.team.email paranoid-manager@example.com
|
||||||
====
|
----
|
||||||
|
|
||||||
Examining the project.config file with any text editor should show
|
Examining the project.config file with any text editor should show
|
||||||
a new notify section describing the email addresses to deliver to:
|
a new notify section describing the email addresses to deliver to:
|
||||||
@@ -79,10 +79,10 @@ group it delivers to is typical. Multiple sections can be specified
|
|||||||
if different filters are needed.
|
if different filters are needed.
|
||||||
|
|
||||||
Commit the configuration change, and push it back:
|
Commit the configuration change, and push it back:
|
||||||
====
|
----
|
||||||
git commit -a -m "Notify team-address@example.com of changes"
|
git commit -a -m "Notify team-address@example.com of changes"
|
||||||
git push ssh://localhost:29418/project HEAD:refs/meta/config
|
git push ssh://localhost:29418/project HEAD:refs/meta/config
|
||||||
====
|
----
|
||||||
|
|
||||||
[[notify.name.email]]notify.<name>.email::
|
[[notify.name.email]]notify.<name>.email::
|
||||||
+
|
+
|
||||||
@@ -132,11 +132,11 @@ has set the filtering options correctly. Project owners can implement
|
|||||||
security filtering by adding the `visibleto:groupname` predicate to
|
security filtering by adding the `visibleto:groupname` predicate to
|
||||||
the filter expression, for example:
|
the filter expression, for example:
|
||||||
|
|
||||||
====
|
----
|
||||||
[notify "Developers"]
|
[notify "Developers"]
|
||||||
email = team-address@example.com
|
email = team-address@example.com
|
||||||
filter = visibleto:Developers
|
filter = visibleto:Developers
|
||||||
====
|
----
|
||||||
|
|
||||||
When sending email to an internal group, the internal group's read
|
When sending email to an internal group, the internal group's read
|
||||||
access is automatically checked by Gerrit and therefore does not
|
access is automatically checked by Gerrit and therefore does not
|
||||||
|
@@ -46,9 +46,9 @@ Also consider 'sub' available in a running Gerrit instance on "server".
|
|||||||
With this feature, one could attach 'sub' inside of 'super' repository
|
With this feature, one could attach 'sub' inside of 'super' repository
|
||||||
at path 'sub' by executing the following command when being inside
|
at path 'sub' by executing the following command when being inside
|
||||||
'super':
|
'super':
|
||||||
====
|
----
|
||||||
git submodule add ssh://server/sub sub
|
git submodule add ssh://server/sub sub
|
||||||
====
|
----
|
||||||
|
|
||||||
Still considering the above example, after its execution notice that
|
Still considering the above example, after its execution notice that
|
||||||
inside the local repository 'super' the 'sub' folder is considered a
|
inside the local repository 'super' the 'sub' folder is considered a
|
||||||
@@ -56,9 +56,9 @@ gitlink to the external repository 'sub'. Also notice a file called
|
|||||||
.gitmodules is created (it is a configuration file containing the
|
.gitmodules is created (it is a configuration file containing the
|
||||||
subscription of 'sub'). To provide the SHA-1 each gitlink points to in
|
subscription of 'sub'). To provide the SHA-1 each gitlink points to in
|
||||||
the external repository, one should use the command:
|
the external repository, one should use the command:
|
||||||
====
|
----
|
||||||
git submodule status
|
git submodule status
|
||||||
====
|
----
|
||||||
|
|
||||||
In the example provided, if 'sub' is updated and 'super' is supposed
|
In the example provided, if 'sub' is updated and 'super' is supposed
|
||||||
to see the latest SHA-1 (considering here 'sub' has only the master
|
to see the latest SHA-1 (considering here 'sub' has only the master
|
||||||
@@ -78,34 +78,34 @@ related information is allowed to be exposed in the superproject,
|
|||||||
the submodule needs to be configured to enable the superproject subscription.
|
the submodule needs to be configured to enable the superproject subscription.
|
||||||
In a submodule client, checkout the refs/meta/config branch and edit
|
In a submodule client, checkout the refs/meta/config branch and edit
|
||||||
the subscribe capabilities in the 'project.config' file:
|
the subscribe capabilities in the 'project.config' file:
|
||||||
====
|
----
|
||||||
git fetch <remote> refs/meta/config:refs/meta/config
|
git fetch <remote> refs/meta/config:refs/meta/config
|
||||||
git checkout refs/meta/config
|
git checkout refs/meta/config
|
||||||
$EDITOR project.config
|
$EDITOR project.config
|
||||||
====
|
----
|
||||||
and add the following lines:
|
and add the following lines:
|
||||||
====
|
----
|
||||||
[allowSuperproject "<superproject>"]
|
[allowSuperproject "<superproject>"]
|
||||||
refs = <refspec>
|
refs = <refspec>
|
||||||
====
|
----
|
||||||
where the 'superproject' should be the exact project name of the superproject.
|
where the 'superproject' should be the exact project name of the superproject.
|
||||||
The refspec defines which branches of the submodule are allowed to be
|
The refspec defines which branches of the submodule are allowed to be
|
||||||
subscribed to which branches of the superproject. See below for
|
subscribed to which branches of the superproject. See below for
|
||||||
link:#acl_refspec[details]. Push the configuration for review and
|
link:#acl_refspec[details]. Push the configuration for review and
|
||||||
submit the change:
|
submit the change:
|
||||||
====
|
----
|
||||||
git add project.config
|
git add project.config
|
||||||
git commit -m "Allow <superproject> to subscribe"
|
git commit -m "Allow <superproject> to subscribe"
|
||||||
git push <remote> HEAD:refs/for/refs/meta/config
|
git push <remote> HEAD:refs/for/refs/meta/config
|
||||||
====
|
----
|
||||||
After the change is integrated a superproject subscription is possible.
|
After the change is integrated a superproject subscription is possible.
|
||||||
|
|
||||||
The configuration is inherited from parent projects, such that you can have
|
The configuration is inherited from parent projects, such that you can have
|
||||||
a configuration in the "All-Projects" project like:
|
a configuration in the "All-Projects" project like:
|
||||||
====
|
----
|
||||||
[allowSuperproject "my-only-superproject"]
|
[allowSuperproject "my-only-superproject"]
|
||||||
refs = refs/heads/*:refs/heads/*
|
refs = refs/heads/*:refs/heads/*
|
||||||
====
|
----
|
||||||
and then you don't have to worry about configuring the individual projects
|
and then you don't have to worry about configuring the individual projects
|
||||||
any more. Child projects cannot negate the parent's configuration.
|
any more. Child projects cannot negate the parent's configuration.
|
||||||
|
|
||||||
@@ -152,25 +152,25 @@ to Git style RefSpecs used for pushing in Git. Regular expressions
|
|||||||
as found in the ACL configuration are not supported. The most restrictive
|
as found in the ACL configuration are not supported. The most restrictive
|
||||||
RefSpec is allowing one specific branch of the submodule to be subscribed
|
RefSpec is allowing one specific branch of the submodule to be subscribed
|
||||||
to one specific branch of the superproject via:
|
to one specific branch of the superproject via:
|
||||||
====
|
----
|
||||||
[allowSuperproject "<superproject>"]
|
[allowSuperproject "<superproject>"]
|
||||||
refs = refs/heads/<submodule-branch>:refs/heads/<superproject-branch>
|
refs = refs/heads/<submodule-branch>:refs/heads/<superproject-branch>
|
||||||
====
|
----
|
||||||
|
|
||||||
If you want to allow for a 1:1 mapping, i.e. 'master' maps to 'master',
|
If you want to allow for a 1:1 mapping, i.e. 'master' maps to 'master',
|
||||||
'stable' maps to 'stable', but not allowing 'master' to be subscribed to
|
'stable' maps to 'stable', but not allowing 'master' to be subscribed to
|
||||||
'stable':
|
'stable':
|
||||||
====
|
----
|
||||||
[allowSuperproject "<superproject>"]
|
[allowSuperproject "<superproject>"]
|
||||||
refs = refs/heads/*:refs/heads/*
|
refs = refs/heads/*:refs/heads/*
|
||||||
====
|
----
|
||||||
|
|
||||||
If you want to enable a branch to be subscribed to any other branch of
|
If you want to enable a branch to be subscribed to any other branch of
|
||||||
the superproject, omit the second part of the RefSpec:
|
the superproject, omit the second part of the RefSpec:
|
||||||
====
|
----
|
||||||
[allowSuperproject "<superproject>"]
|
[allowSuperproject "<superproject>"]
|
||||||
refs = refs/heads/<submodule-branch>
|
refs = refs/heads/<submodule-branch>
|
||||||
====
|
----
|
||||||
|
|
||||||
=== Subscription Limitations
|
=== Subscription Limitations
|
||||||
|
|
||||||
|
@@ -54,16 +54,16 @@ Typically SSH keys are stored in your home directory, under `~/.ssh`.
|
|||||||
If you don't have any keys yet, you can create a new one and protect
|
If you don't have any keys yet, you can create a new one and protect
|
||||||
it with a passphrase:
|
it with a passphrase:
|
||||||
|
|
||||||
====
|
----
|
||||||
ssh-keygen -t rsa
|
ssh-keygen -t rsa
|
||||||
====
|
----
|
||||||
|
|
||||||
Then copy the content of the public key file onto your clipboard,
|
Then copy the content of the public key file onto your clipboard,
|
||||||
and paste it into Gerrit's web interface:
|
and paste it into Gerrit's web interface:
|
||||||
|
|
||||||
====
|
----
|
||||||
cat ~/.ssh/id_rsa.pub
|
cat ~/.ssh/id_rsa.pub
|
||||||
====
|
----
|
||||||
|
|
||||||
[TIP]
|
[TIP]
|
||||||
Users who frequently upload changes will also want to consider
|
Users who frequently upload changes will also want to consider
|
||||||
@@ -80,8 +80,7 @@ To verify your SSH key is working correctly, try using an SSH client
|
|||||||
to connect to Gerrit's SSHD port. By default Gerrit runs on
|
to connect to Gerrit's SSHD port. By default Gerrit runs on
|
||||||
port 29418, using the same hostname as the web server:
|
port 29418, using the same hostname as the web server:
|
||||||
|
|
||||||
====
|
----
|
||||||
..................................................................
|
|
||||||
$ ssh -p 29418 sshusername@hostname
|
$ ssh -p 29418 sshusername@hostname
|
||||||
|
|
||||||
**** Welcome to Gerrit Code Review ****
|
**** Welcome to Gerrit Code Review ****
|
||||||
@@ -94,8 +93,7 @@ port 29418, using the same hostname as the web server:
|
|||||||
git clone ssh://sshusername@hostname:29418/REPOSITORY_NAME.git
|
git clone ssh://sshusername@hostname:29418/REPOSITORY_NAME.git
|
||||||
|
|
||||||
Connection to hostname closed.
|
Connection to hostname closed.
|
||||||
..................................................................
|
----
|
||||||
====
|
|
||||||
|
|
||||||
In the command above, `sshusername` was configured as `Username` on
|
In the command above, `sshusername` was configured as `Username` on
|
||||||
the `Profile` tab of the `Settings` screen. If it is not set,
|
the `Profile` tab of the `Settings` screen. If it is not set,
|
||||||
@@ -105,10 +103,10 @@ To determine the port number Gerrit is running on, visit the special
|
|||||||
information URL `http://'hostname'/ssh_info`, and copy the port
|
information URL `http://'hostname'/ssh_info`, and copy the port
|
||||||
number from the second field:
|
number from the second field:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ curl http://hostname/ssh_info
|
$ curl http://hostname/ssh_info
|
||||||
hostname 29418
|
hostname 29418
|
||||||
====
|
----
|
||||||
|
|
||||||
If you are developing an automated tool to perform uploads to Gerrit,
|
If you are developing an automated tool to perform uploads to Gerrit,
|
||||||
let the user supply the hostname or the web address for Gerrit,
|
let the user supply the hostname or the web address for Gerrit,
|
||||||
@@ -125,17 +123,17 @@ or `NOT_AVAILABLE` if the SSHD server is not currently running.
|
|||||||
To create new changes for review, simply push to the project's
|
To create new changes for review, simply push to the project's
|
||||||
magical `refs/for/'branch'` ref using any Git client tool:
|
magical `refs/for/'branch'` ref using any Git client tool:
|
||||||
|
|
||||||
====
|
----
|
||||||
git push ssh://sshusername@hostname:29418/projectname HEAD:refs/for/branch
|
git push ssh://sshusername@hostname:29418/projectname HEAD:refs/for/branch
|
||||||
====
|
----
|
||||||
|
|
||||||
E.g. `john.doe` can use git push to upload new changes for the
|
E.g. `john.doe` can use git push to upload new changes for the
|
||||||
`experimental` branch of project `kernel/common`, hosted at the
|
`experimental` branch of project `kernel/common`, hosted at the
|
||||||
`git.example.com` Gerrit server:
|
`git.example.com` Gerrit server:
|
||||||
|
|
||||||
====
|
----
|
||||||
git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/experimental
|
git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/experimental
|
||||||
====
|
----
|
||||||
|
|
||||||
Each new commit uploaded by the `git push` client will be
|
Each new commit uploaded by the `git push` client will be
|
||||||
converted into a change record on the server. The remote ref
|
converted into a change record on the server. The remote ref
|
||||||
@@ -163,9 +161,9 @@ the `notify` option:
|
|||||||
|
|
||||||
By default all email notifications are sent.
|
By default all email notifications are sent.
|
||||||
|
|
||||||
====
|
----
|
||||||
git push ssh://bot@git.example.com:29418/kernel/common HEAD:refs/for/master%notify=NONE
|
git push ssh://bot@git.example.com:29418/kernel/common HEAD:refs/for/master%notify=NONE
|
||||||
====
|
----
|
||||||
|
|
||||||
[[topic]]
|
[[topic]]
|
||||||
To include a short tag associated with all of the changes in the
|
To include a short tag associated with all of the changes in the
|
||||||
@@ -174,17 +172,17 @@ the destination branch name. In this example the short topic tag
|
|||||||
'driver/i42' will be saved on each change this push creates or
|
'driver/i42' will be saved on each change this push creates or
|
||||||
updates:
|
updates:
|
||||||
|
|
||||||
====
|
----
|
||||||
git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/experimental%topic=driver/i42
|
git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/experimental%topic=driver/i42
|
||||||
====
|
----
|
||||||
|
|
||||||
[[message]]
|
[[message]]
|
||||||
A comment message can be applied to the change by using the `message` (or `m`)
|
A comment message can be applied to the change by using the `message` (or `m`)
|
||||||
option:
|
option:
|
||||||
|
|
||||||
====
|
----
|
||||||
git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/experimental%m=This_is_a_rebase_on_master
|
git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/experimental%m=This_is_a_rebase_on_master
|
||||||
====
|
----
|
||||||
|
|
||||||
.Note
|
.Note
|
||||||
****
|
****
|
||||||
@@ -196,16 +194,16 @@ it will then be applied as "This is a rebase on master".
|
|||||||
Review labels can be applied to the change by using the `label` (or `l`)
|
Review labels can be applied to the change by using the `label` (or `l`)
|
||||||
option in the reference:
|
option in the reference:
|
||||||
|
|
||||||
====
|
----
|
||||||
git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/experimental%l=Verified+1
|
git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/experimental%l=Verified+1
|
||||||
====
|
----
|
||||||
|
|
||||||
The `l='label[score]'` option may be specified more than once to
|
The `l='label[score]'` option may be specified more than once to
|
||||||
apply multiple review labels.
|
apply multiple review labels.
|
||||||
|
|
||||||
====
|
----
|
||||||
git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/experimental%l=Code-Review+1,l=Verified+1
|
git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/experimental%l=Code-Review+1,l=Verified+1
|
||||||
====
|
----
|
||||||
|
|
||||||
The value is optional. If not specified, it defaults to +1 (if
|
The value is optional. If not specified, it defaults to +1 (if
|
||||||
the label range allows it).
|
the label range allows it).
|
||||||
@@ -214,9 +212,9 @@ the label range allows it).
|
|||||||
A change edit can be pushed by specifying the `edit` (or `e`) option on
|
A change edit can be pushed by specifying the `edit` (or `e`) option on
|
||||||
the reference:
|
the reference:
|
||||||
|
|
||||||
====
|
----
|
||||||
git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/master%edit
|
git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/master%edit
|
||||||
====
|
----
|
||||||
|
|
||||||
There is at most one change edit per user and change. In order to push
|
There is at most one change edit per user and change. In order to push
|
||||||
a change edit the change must already exist.
|
a change edit the change must already exist.
|
||||||
@@ -232,7 +230,7 @@ consider adding an SSH host block in `~/.ssh/config` to remember
|
|||||||
your username, hostname and port number. This permits the use of
|
your username, hostname and port number. This permits the use of
|
||||||
shorter URLs on the command line, such as:
|
shorter URLs on the command line, such as:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ cat ~/.ssh/config
|
$ cat ~/.ssh/config
|
||||||
...
|
...
|
||||||
Host tr
|
Host tr
|
||||||
@@ -241,15 +239,15 @@ shorter URLs on the command line, such as:
|
|||||||
User john.doe
|
User john.doe
|
||||||
|
|
||||||
$ git push tr:kernel/common HEAD:refs/for/experimental
|
$ git push tr:kernel/common HEAD:refs/for/experimental
|
||||||
====
|
----
|
||||||
|
|
||||||
Specific reviewers can be requested and/or additional 'carbon
|
Specific reviewers can be requested and/or additional 'carbon
|
||||||
copies' of the notification message may be sent by including the
|
copies' of the notification message may be sent by including the
|
||||||
`reviewer` (or `r`) and `cc` options in the reference:
|
`reviewer` (or `r`) and `cc` options in the reference:
|
||||||
|
|
||||||
====
|
----
|
||||||
git push tr:kernel/common HEAD:refs/for/experimental%r=a@a.com,cc=b@o.com
|
git push tr:kernel/common HEAD:refs/for/experimental%r=a@a.com,cc=b@o.com
|
||||||
====
|
----
|
||||||
|
|
||||||
The `r='email'` and `cc='email'` options may be specified as many
|
The `r='email'` and `cc='email'` options may be specified as many
|
||||||
times as necessary to cover all interested parties. Gerrit will
|
times as necessary to cover all interested parties. Gerrit will
|
||||||
@@ -261,7 +259,7 @@ If you are frequently sending changes to the same parties and/or
|
|||||||
branches, consider adding a custom remote block to your project's
|
branches, consider adding a custom remote block to your project's
|
||||||
`.git/config` file:
|
`.git/config` file:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ cat .git/config
|
$ cat .git/config
|
||||||
...
|
...
|
||||||
[remote "exp"]
|
[remote "exp"]
|
||||||
@@ -269,7 +267,7 @@ branches, consider adding a custom remote block to your project's
|
|||||||
push = HEAD:refs/for/experimental%r=a@a.com,cc=b@o.com
|
push = HEAD:refs/for/experimental%r=a@a.com,cc=b@o.com
|
||||||
|
|
||||||
$ git push exp
|
$ git push exp
|
||||||
====
|
----
|
||||||
|
|
||||||
|
|
||||||
[[push_replace]]
|
[[push_replace]]
|
||||||
@@ -310,9 +308,9 @@ commit to the change's ref. For example, to add the commit whose
|
|||||||
SHA-1 starts with `c0ffee` as a new patch set for change number
|
SHA-1 starts with `c0ffee` as a new patch set for change number
|
||||||
`1979`, use the push refspec `c0ffee:refs/changes/1979` as below:
|
`1979`, use the push refspec `c0ffee:refs/changes/1979` as below:
|
||||||
|
|
||||||
====
|
----
|
||||||
git push ssh://sshusername@hostname:29418/projectname c0ffee:refs/changes/1979
|
git push ssh://sshusername@hostname:29418/projectname c0ffee:refs/changes/1979
|
||||||
====
|
----
|
||||||
|
|
||||||
This form can be combined together with `refs/for/'branchname'`
|
This form can be combined together with `refs/for/'branchname'`
|
||||||
(above) to simultaneously create new changes and replace changes
|
(above) to simultaneously create new changes and replace changes
|
||||||
@@ -320,7 +318,7 @@ during one network transaction.
|
|||||||
|
|
||||||
For example, consider the following sequence of events:
|
For example, consider the following sequence of events:
|
||||||
|
|
||||||
====
|
----
|
||||||
$ git commit -m A ; # create 3 commits
|
$ git commit -m A ; # create 3 commits
|
||||||
$ git commit -m B
|
$ git commit -m B
|
||||||
$ git commit -m C
|
$ git commit -m C
|
||||||
@@ -337,7 +335,7 @@ For example, consider the following sequence of events:
|
|||||||
HEAD~3:refs/changes/1500
|
HEAD~3:refs/changes/1500
|
||||||
HEAD~1:refs/changes/1501
|
HEAD~1:refs/changes/1501
|
||||||
HEAD~0:refs/changes/1502 ; # upload replacements
|
HEAD~0:refs/changes/1502 ; # upload replacements
|
||||||
====
|
----
|
||||||
|
|
||||||
At the final step during the push Gerrit will attach A' as a new
|
At the final step during the push Gerrit will attach A' as a new
|
||||||
patch set on change 1500; B' as a new patch set on change 1501; C'
|
patch set on change 1500; B' as a new patch set on change 1501; C'
|
||||||
@@ -404,9 +402,9 @@ for teams that don't want to do code review but want to use Gerrit's
|
|||||||
submit strategies to handle contention on busy branches. Using
|
submit strategies to handle contention on busy branches. Using
|
||||||
`%submit` creates a change and submits it immediately:
|
`%submit` creates a change and submits it immediately:
|
||||||
|
|
||||||
====
|
----
|
||||||
git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/master%submit
|
git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/master%submit
|
||||||
====
|
----
|
||||||
|
|
||||||
On auto-merge of a change neither labels nor submit rules are checked.
|
On auto-merge of a change neither labels nor submit rules are checked.
|
||||||
If the merge fails the change stays open, but when pushing a new patch
|
If the merge fails the change stays open, but when pushing a new patch
|
||||||
@@ -426,18 +424,18 @@ that have never before been seen by the Gerrit server. Clients
|
|||||||
may override that behavior and force new changes to be created
|
may override that behavior and force new changes to be created
|
||||||
by setting the merge base SHA-1 using the '%base' argument:
|
by setting the merge base SHA-1 using the '%base' argument:
|
||||||
|
|
||||||
====
|
----
|
||||||
git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/master%base=$(git rev-parse origin/master)
|
git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/master%base=$(git rev-parse origin/master)
|
||||||
====
|
----
|
||||||
|
|
||||||
It is also possible to specify more than one '%base' argument.
|
It is also possible to specify more than one '%base' argument.
|
||||||
This may be useful when pushing a merge commit. Note that the '%'
|
This may be useful when pushing a merge commit. Note that the '%'
|
||||||
character has only to be provided once, for the first '%base'
|
character has only to be provided once, for the first '%base'
|
||||||
argument:
|
argument:
|
||||||
|
|
||||||
====
|
----
|
||||||
git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/master%base=commit-id1,base=commit-id2
|
git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/master%base=commit-id1,base=commit-id2
|
||||||
====
|
----
|
||||||
|
|
||||||
|
|
||||||
== repo upload
|
== repo upload
|
||||||
|
Reference in New Issue
Block a user