enhance man page

* a bit longer option description
* describe the .ini file
* some very basic examples

Patchset2: various typos and improper english.
Patchset3: three more typos

Thanks to Roan Kattouw for the proof reading.

Change-Id: I2fa74fe2ede8568919929db34ca0b9dee28c6541
This commit is contained in:
Antoine Musso
2012-03-27 15:51:25 +02:00
parent 4fead107ca
commit 0263d69a9e

View File

@@ -35,18 +35,22 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
\fBgit\-review\fP [\fIOPTIONS <git\-review\-options\-label\fP] [\fIBRANCH\fP]
.SH DESCRIPTION
.sp
\fBgit\-review\fP automates and streamlines some of the tasks involve with
\fBgit\-review\fP automates and streamlines some of the tasks involved with
submitting local changes to a \fIGerrit\fP server for review.
.sp
This command usually makes it much easier to apprehend Gerrit, especially for users already had to move to git from another SCM.
.SH OPTIONS
.INDENT 0.0
.TP
.B \-\-topic, \-t
.sp
Sets the target topic for this change on the gerrit server.
Sets the target topic for this change on the gerrit server. By default, will
use the bug number in the commit summary if any is present and fallback to use
the local branch name whenever it is different from the remote branch.
.TP
.B \-\-draft, \-D
.sp
Submit review as a draft
Submit review as a draft (Gerrit 2.3).
.TP
.B \-\-dry\-run, \-n
.sp
@@ -61,11 +65,13 @@ git remote to use for gerrit
.sp
Do not automatically perform a rebase before submitting the change to
gerrit.
When submitting a change for review, you will usually want it to be based on the tip of upstream branch in order to avoid avoid possible conflicts.
When amending a change and rebasing the new patchset, the Gerrit web interface will show a difference between the two patchsets which contains all commits in between. This will surely confuse many reviewers that would expect to see a much simpler difference.
.TP
.B \-\-download, \-d
.sp
Treat the argument as the review id of a review to download into a local
branch.
Review id to download patch from Gerrit into a local branch. The branch will be named according to the upstream patch author and topic branch name.
.TP
.B \-\-update, \-u
.sp
@@ -83,11 +89,11 @@ successful submission.
.B \-\-yes, \-y
.sp
Indicate that you do, in fact, understand if you are submitting more than
one patch
one patch.
.TP
.B \-\-verbose, \-v
.sp
Turns on more verbose output.
Turns on more verbose output such as git commands being executed.
.TP
.B \-\-version
.sp
@@ -96,22 +102,77 @@ Print the version number and exit.
.SH PROJECT CONFIGURATION
.sp
To use git\-review with your project, it is recommended that you create
a file at the root of the repository called ".gitreview" and place
information about your gerrit installation in it. The format is:
a file at the root of the repository named ".gitreview". This file should
contains informations to help git-review interact with your Gerrit
installation. The format is similar to the popular .ini format:
.sp
.nf
.ft C
[gerrit]
host=<gerrit hostname>
port=<gerrit TCP port>
project=<project name>
defaultbranch=<branch>
.sp
.ft P
.fi
As an example for a project named departement/project hosted on review.example.com port 29418 and using branch "master":
.sp
.nf
.ft C
[gerrit]
host=review.example.com
port=29418
project=project.git
project=departement/project.git
defaultbranch=master
.ft P
.fi
.re
.SH EXAMPLES
.SS Fetching:
To fetch a remote change numbered 3004:
.sp
.RS 4
.nf
$ git-review -d 3004
Downloading refs/changes/04/3004/1 from gerrit into
review/someone/topic_name
Switched to branch 'review/someone/topic_name
$ git branch
master
* review/author/topic_name
$
.fi
.RE
.sp
Notice how git-review looks up both the author and Gerrit topic branch to name the branch created locally. It makes things easier to track locally.
.SS Publishing change:
.sp
Following the previous example (fetching), here how to send a change for review while deleting the associated local branch:
.sp
.RS 4
.nf
$ git-review -f
remote: Resolving deltas: 0% (0/8)
To ssh://username@review.example.com/departement/project.git
* [new branch] HEAD -> refs/for/master/topic_name
Switched to branch 'master'
Deleted branch 'review/someone/topic_name'
$ git branch
* master
$
.fi
.RE
.SH AUTHOR
OpenStack, LLC
git-review is maintained by OpenStack, LLC
.SH REPORTING BUGS
https://launchpad.net/git-review
.SH COPYRIGHT
2011, OpenStack, LLC
.\" Generated by docutils manpage writer.
.\"
.\"
.