Fix crash in rbt diff.

The return of get_diff was not handled corretly, as rbtools/commands/diff.py
has not been changed in commit 29c899c7 as it should.

Reviewed at https://reviews.reviewboard.org/r/4739/
Initialize the superclass for ReviewBoardHTTPPasswordMgr

Pylint complains that this isn't initialized. Unfortunately, HTTPPasswordMgr is
an old-style class so we can't use super() here.

Reviewed at https://reviews.reviewboard.org/r/4781/
Make exit on SIGINT more user-friendly.

Ctrl+C'ing rbtools commands would bail out with an ugly exception. This now
adds a handler for SIGINT which will close out cleanly and exit with a useful
exit code.

Testing done:
Cancelled out of both rbt post and post-review. Checked exit code.

Reviewed at https://reviews.reviewboard.org/r/4788/
Fix handling of the --username and --password options to match post-review.

The way that the --username and --password options were handled were a little
annoying, and worked differently between rbt and post-review. This change
pushes the username/password is None logic down into the interactive prompt
method, and adds some checks to avoid prompting if these are specified via the
command line.

Testing done:
Posted reviews with rbt when specifying --username only and saw only the
password prompt.

Reviewed at https://reviews.reviewboard.org/r/4785/
Fixes bug 3114.
Ignore stderr with 'svn propget reviewboard:url .'

On my system the local en_US.UTF-8 does not exist (I have he_IL.UTF-8).
rbutils.utils.process.execute() forces the environment to be
LC_ALL=en_US.UTF-8, LANGUAGE=en_US.UTF-8. I can't override this from outside.
This means that svn will complain to the standad error about not being able to
set LC_CTYPE.

Furthermore, by default that function (execute()) will redirect stderr with
stdout. This resulted in the reviewbord server being '<long message from
svn><the URL>'.

This fix forces not redirecting the standard error there.

Reviewed at https://reviews.reviewboard.org/r/4670/
Clean up the git diff call a little bit

In particular -M (--find-renames) and --no-renames should be mutually exclusive
and the revision range should come last in the diff command before any options
terminating dashes (--) and paths. git doesn't enforce this today, but it could
tomorrow.

Testing done: Posted a review request with rbt.

Reviewed at https://reviews.reviewboard.org/r/4823/
Make rbt and post-review consistent in their treatment of missing passwords.

The way we handled the http response wasn't the same between the postreview.py
and api/request.py. In particular, different improvements had been made to each
without porting to the other. The rbt version checked the validity of
'response', while the post-review one used httplib's constants. This change
makes the two consistent.

Based on https://reviews.reviewboard.org/r/4787/
Fix git parent diff support in diff_between_revisions

The calling contract stipulates that the parent diff should be in a
dictionary entry called 'parent_diff', not 'parent_diff_lines'.

I also snuck in a change to the git unit tests: if they don't create a
dummy .gitconfig in the new HOME, "git commit" dies later, triggering all
sorts of unhappiness in nose.

Testing done: Ran post-review with --revision-range.
Fixes bug 3125
Reviewed at https://reviews.reviewboard.org/r/4870/
Fix a missing import.

Somehow we ended up using httplib without importing it. Trivial fix.
Turn off the General Index for release notes.

The General Index page on RBTools release notes was useless, so turn it
off.
Upload RBTools releases to Amazon S3.

We're now using Amazon S3 to store all our releases. This updates our
release script to do that. It requires our new 'fabazon' module to help
interface with S3 and perform S3 uploading and directory index
regeneration.
Fix Resource bug that masked the url from ReviewBoard's Web API.

The 'url' attribute in Resource pointed to the Web API resource instead of the
web page.

Testing done: Unit tests pass.

Reviewed at https://reviews.reviewboard.org/r/4899/
Add option to rbt patch for automatically creating a Git commit

The option -c, --commit automatically creates a commit in the current local
branch with the summary, description, bugs, testing, and author information
fetched from the review request.

Testing done:
Tested with a new review request using the commands 'rbt patch -c
<review_request_id>' and 'rbt patch --commit <review_request_id>'.

Unit tests passed.

Reviewed at https://reviews.reviewboard.org/r/4865/
Make 'rbt --help' be a little more sensical.

The help output for rbt would say "the most commonly-used commands are:" and
then proceed to spit out an unordered list of every command, no matter how
commonly used.

I've replaced the "most common" commands list with a curated list of the things
that I think are actually most common, in the order that people probably care
about them. We then print out the rest of the commands in alphabetical order.

Testing done: Ran rbt --help

Reviewed at https://reviews.reviewboard.org/r/4987/
Enhance rbt post to automatically determine the existing review request

``rbt -u`` automatically determines the existing review request to update. It
suggests a pending review request by the current user in the current
repository, based on the request summary and description.

If the summary and description exactly match those of an existing request, the
request is immediately updated. Otherwise, the user is prompted to confirm a
suggestion from a ranked list of potential matches.

Testing Done:
- Tested with Git, Mercurial, and Bazaar using, with and without 'revision
  range'.
- Unit tests pass.

Reviewed at https://reviews.reviewboard.org/r/4699/
Do some trivial rearranging to the rbt docs.

This change moves 'rbt' ahead of 'post-review', changes the "beta" notice on
the rbt page, and adds a deprecation warning on the 'post-review' page. Really
I just wanted the fish.

Testing done: Built HTML and looked at it.

Reviewed at https://reviews.reviewboard.org/r/4994/
Flatten rbtools docs a bit.

The structure of the rbtools docs made it really unclear how to actually see
information about using the tools, since the table of contents just had stuff
about installation.

I've pulled the rbt/index and api/index files into index itself, under a "Using
RBTools" section. At least this way, the top-level TOC has something other than
"Installation", and there are a bunch of links visible as soon as you see the
page to the specific commands, instead of having to drill down through several
pages.

While I was doing this, I pulled in the info from "Automating post-review" in
the old tools section of the Review Board user manual, which seemed to be the
only thing present in that that wasn't here.

Testing done: Built html docs and looked through them.

Reviewed at https://reviews.reviewboard.org/r/4997/
Add command for configuring a repository to point to a Review Board server

The new command 'setup-repo' interactively creates the configuration file
.reviewboard in the user's current working directory.

Testing Done:
- Tested with Git and Subversion on two Review Board servers.
- Unit tests pass.

Reviewed at https://reviews.reviewboard.org/r/4662/
Un-escape markdown text for 'rbt patch -c'

The patching step was including escaped characters in the description and
testing done, which was annoying to look at, and made it so in the case where
the first line of the description was the same as the summary except for
escaping, we wouldn't collapse them together.

This change adds some code to do the same as markdown_unscape() from
reviewboard.reviews.markdown_utils.

Testing done:
Ran `rbt patch -c` for a few changes on reviews.reviewboard.org that had
escaped descriptions and testing done. Saw the expected results.

Reviewed at https://reviews.reviewboard.org/r/5014/
Fix post -u bug that uses the incorrect summary.

Fix post -u bug that uses the incorrect summary.

If a draft exists for the review request, post -u should use the draft's
summary and description instead of the review request's summary and description
to detect and prompt for the review request to update. This patch fixes the
issue where post -u would always use the review request’s summary and
description even if a draft exists.

Testing done:
Tested with published and draft review requests.
Unit tests passed.

Reviewed at https://reviews.reviewboard.org/r/5041/