Fix diffing for submitted Perforce changelists.

Somewhere in my diff refactoring, a couple crucial lines for diffing the files
for edited files in submitted changelists got deleted. Trivial fix.

Fixes bug 3335.
Added Depends On field to rbt post

Added the ability to write to the Depends On field for a review through the rbt
post tool. Through the use of the flag --depends-on, one can specify review
numbers (comma separated) that the review depends on. The new flag has been
added to the rbt post manual.

Testing Done:
The manual was tested by using 'make html' to ensure that the formatting was
correct. For testing the flag, I created two fake reviews (id: 1 and 2) on my
local machine. Then I made, added, and committed a change to the reviewboard
repository. I ran the post command with the flag --depends-on 1 and checked to
ensure it added it in the web view. I then tested with --depends-on "1, 2" to
ensure it supports multiple revisions. Finally, I tested --depends-on "test" to
ensure it was checking arguments.

Bugs closed: 3074

Reviewed at https://reviews.reviewboard.org/r/5799/
Use the correct binary name for GNU diff on Solaris.

People still use Solaris! On Solaris, GNU diff is called 'gdiff'. Some of our
code (particularly in the perforce client) handled this, but the check to make
sure that we were using GNU diff didn't.

Testing done:
I haven't had access to a Solaris machine in over a decade (eep), so I couldn't
test that part, but I ran the unit tests to make sure I didn't fudge up
anything else.

Fixes bug 3334.

Reviewed at https://reviews.reviewboard.org/r/5793/
Fix posting of perforce paths.

The path behavior for rbt post was broken in a couple ways, probably for quite
some time. The first issue was that we had changed the `p4 change` usage to use
marshalled results, but the run_p4 method didn't respect the ignore_errors flag
when marshalling, and would call die(). Once I fixed this, the code that checks
the status of the changelist couldn't cope with error states. With these fixes,
_get_changelist_status will return None, which will cause parse_revision_spec
to correctly determine that the given path is not actually a revision.

Testing done:
Ran unit tests.

Fixes bug 3336.

Reviewed at https://reviews.reviewboard.org/r/5794/
Output URL of new incomplete review

If `rbt post` did create review but failed before completing it, user had to
find the incomplete review themselves (and discard or complete it manually).

This patch adds the URI to the error message so that remedy is less cumbersome.

Testing Done:
I have tested this on my local machine, where rbt fails to post commit,
reporting HTTP 400 / API error 207. (Previous review request #5825 from Stephen
Gallagher addresses that)

Reviewed at https://reviews.reviewboard.org/r/5826/
Properly generate parent diffs in git with multiple remotes

When posting a revision range with Git, the git diff would try hard to
determine whether or not a parent diff was required by checking to see if the
first revision in the range was contained in the remote. This works fine for
basic setups where there's a single remote that's the same one that Review
Board talks to.

Unfortunately, if a user has multiple remotes, and pushes commits to a remote
which is different from the one Review Board uses, rbt would think that a
parent diff isn't required when it really is.

This change gets rid of the fancy testing, and just checks that the merge base
isn't the same as the parent revision. The worst case here is that we end up
generating a parent diff when it's not truly required, but it fixes the
problems with multiple remotes.

Testing Done:
1) Set up a series of patches that depended on one another. (Patch 2 depends
   on changes from patch 1)
2) Pushed the patches to a remote git repository
3) Ran 'rbt post patch1:patch2'

Previous behavior:
The file was not found in the repository (HTTP 400, API Error 207)

Behavior after this patch:
Review was properly uploaded.

Reviewed at https://reviews.reviewboard.org/r/5825/
Fix UnboundLocalError when posting Perforce paths.

Posting Perforce paths using `rbt post` would sometimes result in an
UnboundLocalError because the local variable `new_path` was referenced before
assignment. This is a trivial fix, changing the argument from `new_path` to
`old_path`.

Testing Done:
- Ran unit tests.
- Ran `rbt post //p4-test2/foo@2,@3` (which previously resulted in the error),
  and saw that the review request was created successfully.

Reviewed at https://reviews.reviewboard.org/r/5834/
Fix a traceback when running with git on cygwin.

Because cygwin paths can sometimes get different results (either C:\... or
/cygdrive/...), we need some special handling for determining the toplevel
directory of the git clone.

Trivial change.
Fix posting submitted changelists for perforce.

The code to post submitted changelists would end up posting a diff  for both
the intended change and the one preceeding it. This is because we passed in
our (base, tip] revisions for 'p4 filelog', which itself behaves as [base,
tip]. To work around this, I've added code to increment the base revision
before calling filelog.

Testing done: Ran unit tests.

Fixes bug 3347.

Reviewed at https://reviews.reviewboard.org/r/5837/
Merge branch 'master' of https://github.com/reviewboard/rbtools

* 'master' of https://github.com/reviewboard/rbtools:
  Fix posting submitted changelists for perforce.
  Fix a traceback when running with git on cygwin.
  Fix UnboundLocalError when posting Perforce paths.
  Properly generate parent diffs in git with multiple remotes
  Output URL of new incomplete review
  Fix posting of perforce paths.
  Use the correct binary name for GNU diff on Solaris.
  Added Depends On field to rbt post
  Fix diffing for submitted Perforce changelists.