Warn about dirty directory when running 'rbt post' with Mercurial repository

As with Git, the Mercurial backend only posts changesets and ignores
uncommitted changes. Warn users about this, since they may expect to be able to
post the same output as 'hg diff'.

Testing Done:
Ran 'rbt post' both with and without uncommitted changes.
I'm not sure if we want the '--deleted' flag included, since it's files that
are tracked but have been deleted - e.g. using 'rm file' instead of 'hg rm
file'.

Reviewed at https://reviews.reviewboard.org/r/6082/
Don't try to decode responses from HTTP DELETE calls to the API.

Successful DELETE on an API resource will return HTTP 204 and an empty payload.
In the case where this call succeeds, we shouldn't try to JSON decode the
result because it won't work.

Testing done:
Deleted a repository using the RBTools API and didn't see the traceback
anymore.

Fixes bug 3450.

Reviewed at https://reviews.reviewboard.org/r/6097/
Print out "your review request still exists" when there are field errors.

When posting a change, if the diff has a parse error, we printed out a message
that a review request was created, including the URL to it. In the case where
updating the draft fails (for example, when assigning reviewers based on command-line
arguments), we weren't showing a similar error. This change fixes it so that
the user gets the full error.

Testing done:
Tried to post a change with an invalid group listed in --target-groups. Saw an
error that included the new output.

Fixes bug 3428.

Reviewed at https://reviews.reviewboard.org/r/6098/
Fix handling of deleted files in submitted perforce changelists.

When we fetch the list of affected files in a given changelist, perforce
reports deleted files with a revision number. That revision corresponds to the
deleted version of the file, and p4 print will just return empty. This is
similar to edits, where the revision is actually the post-edited revision
rather than the pre-edited version, and we need to decrement the revision.

Testing done:
- Ran through some p4 deletes.
- Ran unit tests.

Fixes bug 3497.

Reviewed at https://reviews.reviewboard.org/r/6191/
rbt post: checking repository info on server does not work anymore

The rbt post code didn't use the find_server_repository_info methods, which
were very useful for handling additional repository matching methods for
clearcase and SVN.

This also fixes the ClearCaseRepositoryInfo call from clearcase.py (3rd
parameter is vobstag, I suppose "uuid" was an old copy paste from svn
implementation).

Testing Done:
- Can post review request from any clearcase vob using rbt post 0.5.x.
- Tested on release-0.5.x => rbt post works but breaks post-review.
- Ran unit tests.

Bugs closed: 3533

Reviewed at https://reviews.reviewboard.org/r/6233/
Bump to 0.6.3 dev.
Fix _has_hgsubversion to handle OSError.

In the case that running 'hg svn ...' fails with an OSError, we want to skip
tests rather than failing. Trivial change.
Fix posting with SVN.

The recent patch I accepted to reintroduce usage of find_server_repository_info
exposed a bug. The SVN implementation of this method hadn't been updated to
cope with recent changes to the attribute behavior of API objects, and so
trying to use repository.get('mirror_path') caused an AttributeError. We can
blame Python's dumb slots for that.

I've rewritten this part of the code to avoid the built-in get() method and
check hasattr instead.

Testing done:
Tried to post a change against my local devserver with an svn repository.
Before this change, I'd always get an AttributeError when trying to find the
repository. After, everything posts fine.

Reviewed at https://reviews.reviewboard.org/r/6285/
Allow return code of '1' from 'svn propget'

SVN 1.9 has apparently decided to break the "API" of the 'svn propget' command
by making a return value of '1' indicate success. This change adds that return
code to the allowed errors for the command.

Testing done:
I don't have SVN 1.9, but I made sure that propget still worked correctly on
1.7.x.

Fixes bug 3566.

Reviewed at https://reviews.reviewboard.org/r/6325/
Fix GIT_USE_EXT_DIFF.

The code to enable-disable external diff programs for git wasn't quite right,
in that it worked as intended if the config parameter was not present, but if
it was, the value was backwards.

Testing done:
Set my diff viewer to an external program and verified that the setting now
worked as intended.

Reviewed at https://reviews.reviewboard.org/r/6417/
Provide a better error message when hg upstream is empty.

Running `rbt post` or `rbt diff` will now print an error message that explains
that it expects the upstream repository not to be empty. The old behaviour was
to print out a cryptic error message (`CRITICAL: list index out of range`).
This new behaviour indicates the source of the underlying problem.

Testing Done:
Tested `rbt diff` with an empty Mercurial upstream repository. It now prints
the correct error message instead of the cryptic one.

Bugs closed: 3565

Reviewed at https://reviews.reviewboard.org/r/6428/
Don't fail when using --diff-filename=- and credentials on the command line.

When passing a diff in on stdin, we can't also prompt for credentials.
Unfortunately, the check for this was also making it so that it would fail
even in the case where credentails were passed in on the command-line. Moving
the check fixes the problem.

Testing done:
- Smoke tested --diff-filename.
- Ran unit tests.

Fixes bug 3313.

Reviewed at https://reviews.reviewboard.org/r/6538/
Merge branch 'release-0.6.x' into release-0.6.x-prep