Better determine git directories

- Call "git-rev-parse" only once, not twice
- In case where current directory is unreadable,
the current message is:

No '.gitreview' file found in this repository.
We don't know where your gerrit is. Please manually create
a remote named gerrit and try again.

(which is not true, because .gitreview *is* present)

After this change it fails a bit better:

Cannot determine where .git directory is
The following command failed with exit code 128
    "git rev-parse --show-toplevel --git-dir"
-----------------------
fatal: Unable to read current working directory: No such
file or directory
-----------------------

Change-Id: Idbb1e68b689f226d9434db131db5d9765752a315
Document gitreview.username

Document git-review specific options
in the Git configuration system.

Currently we have only gitreview.username,
but another one (gitreview.rebase) is
pending in change I96dfab1af48d8f1592766fea4b97e0f35c03d8a5.

Change-Id: I5b34effee355e0075fa3c2c2acea4429198d7e85
Merge "Better determine git directories"
Make README.md ReST-friendly

Description at PyPI looks ugly with all these hashes. Changed according
to https://gist.github.com/dupuy/1855764

Change-Id: I070a245d417cf36f115741418764630d053da476
Download specific Patch Set for Review

Adds ability to request download and checkout
of specific review-patchset using syntax:
 git review -d <reviewId>,<patchsetNumber>

It will create and checkout the <author>/<topic>-patch<number> branch.

Change-Id: Idaf57acb1464e1e71a436d741ae889494a91d446
Add custom scripts features.

- Allow running custom scripts on different action of git-review.
- Fixes bug 1021870.

Change-Id: I0e6e72322115daf3986e5957d79de0f3402e7841
Don't call get_branch_name from assert_one_change

pyflakes reports:

git-review:464: local variable 'branch_name' is assigned to but never
used

Change-Id: I4b44feda65f2a5014107c7f606ada8550391b176
Merge "Add custom scripts features."
Changed the text of the manpage to read "make it easier to comprehend Gerrit".

Change-Id: If363cb4c5eeaa76f6d64bf0a1f431ff925f8ae2d
Merge "Don't call get_branch_name from assert_one_change"
bug/1144800: Fix fatal: both revision and filename

Although bug/1144800 as described was fixed in
Icd62c2ee359b95877097a57a3b517434d9f7f5e0
there is still a corner case where "HEAD" is the
file in the repository.

Change-Id: I0954e99b972a5b008fa7a0b9a64824b8daacd541
Compare different Patch Sets of Review

Adds ability to fetch/checkout branches and launch git diff
for different review patchsets with one command.

Change-Id: I5815eb0cb6025978a39d74ddb31eb179f06154de
Merge "Compare different Patch Sets of Review"
Jeremy's manpath workaround breaks on Fedora

In Fedora, /usr/man and /usr/local/man do not exist. So far, so good,
100% LSB compliant, etc. But in such case Jeremy's workaround tries
to install into /usr/man, so builds fail.

Suggestion: keep 'share/man' as the normal path and only invoke the
workaround when it's needed.

Ironically, if you look at Jeremy's original review patch 1, it worked
properly: it detected if something was symlinked and expanded those.
But then some kind of ridiculously involved problem with package
upgrades in Debian popped up and the condition was quietly inverted.
 See https://review.openstack.org/15146

Bug: 1073766
Change-Id: I78c2d2a0456ac2aa921b4d0720634622569d145d
Use the local branch name as topic only if it is different from remote

The manpage already mentions:

"Alternatively, the local branch name will be used if different from
remote branch."

But actually local branch name was always used: simply don't specify a
topic if it would be the same as the branch name to avoid generating
unnecessary noise.

Change-Id: Idd7ac66d0df19a7abdae86f08174e1e37c29a19b