Change 'rbt diff' and 'rbt post' to take revisions as arguments.

This change updates the 'diff' and 'post' commands to treat extra arguments as
the revision spec, and adds a new -I/--include flag to specify any files to
limit the diff to.

This is done for all SCMs except ClearCase. I need to work through all the
pending ClearCase patches and read through the proposal on how to fit it into
this new world order.

This also includes some changes to the way that changenums are pulled out for
perforce and plastic. Ideally I'd like to get rid of the server-side
summary/description fetch and implement the --guess-* options, but that would
likely piss off a lot of users. Instead, I've just moved the changenum
extraction into the diff methods, so that we don't duplicate the work of
parsing revisions in two different ways. This also returns 'None' for submitted
changelists (for now) because the server-side code is broken at the moment.

Whether or not files are supported is currently client-dependent. Most already
did, and I've added it for git. It's still not done for Plastic, since my
Plastic expertise is exactly zero.

Testing done:
* Ran unit tests
* Checked diffs and extracted summaries for:
  * bzr backend with zero, one, and two-arg forms.
  * cvs backend with zero arguments. I haven't tested the two-arg form because
    after trying four different public CVS repos, I have yet to find one that
    (a) has a CVSROOT, (b) allows me to check it out, (c) allows me to do a
    diff between two tags, and (d) have that diff not contain broken text
    encodings.
  * hg backend with zero, one, and two-arg forms.
  * hgsubversion backend with zero, one, and two-arg forms.
  * git backend with zero, one, and two-arg forms.
  * git-p4 backend with zero, one, and two-arg forms.
  * git-svn backend with zero, one, and two-arg forms.
  * perforce backend with zero, one, and two-arg forms, including submitted and
    shelved changesets.
  * svn backend with zero, one, and two-arg forms, including changelists.

Reviewed at https://reviews.reviewboard.org/r/5226/
Fixed error output on rbt setup-repo when writing .reviewboardrc fails.

This is a trivial fix to include both formatting arguments when
displaying an error after failing to write .reviewboardrc. Previously,
the arguments weren't wrapped in a tuple.
Release RBTools 0.5.4.
Merge branch 'release-0.5.x'
Allow for using repository names with Subversion repositories in 0.5.x.

Repository names for Subversion repositories broke Subversion. On
0.5.x, the name is stuffed into the repository_url setting, which the
Subversion code assumes means we're operating on some possibly remote
repository.

The proper fix to separate out repository names and URLs is coming in
0.6, but for now, we check the repository_url whenever we use it to see
whether it's a URL or a name.

This is intended to stay only on the 0.5.x branch, and will not merge to
master.
Add --svn-show-copies-as-adds to post-review.

This option was added to rbt post but not post-review, but unfortunately the
backend didn't know that. There's no reason to not have it in post-review, for
people who still need to use that for some reason or other.
Release RBTools 0.5.5.
Merge branch 'release-0.5.x'
Merge branch 'release-0.5.x'
Fix the link to the 0.5.5 release notes.
Merge branch 'release-0.5.x'
Support parent diffs with Mercurial

This patch adds support for parent diffs to Mercurial when specifying specific
revisions. If the base revision is not included in the remote, a relevant
parent diff will be automatically determined.

This does not yet support using the --parent-branch to specify a parent when
posting the current tip.

Testing Done:
Wrote some new tests. Executed tests locally and everything appears to work as
expected!

Bugs: 3067

Reviewed at https://reviews.reviewboard.org/r/5207/
Fix rbt status with Perforce.

rbt status broke with Perforce due to Perforce's assumption that
options.revision_range existed. We now do a conditional check like every
other SCMClient.
Fix compatibility with Python 2.4

In a recent release, new code used 2.7/3.x style exception raising.  This patch
uses standard 2.x exception raising and returns compatibility with Python 2.4
to RBTools.

Testing Done:
Using the functionality in setup_repo.py under Python 2.4 returns no errors.
No further testing should be required.

Bugs closed: 3193

Reviewed at https://reviews.reviewboard.org/r/5267/
Merge branch 'release-0.5.x'
Fix issues with successive calls to .create() or .update() on resources.

The create and update methods had a parameter `data` which had a default value
of {}. In the body of these methods, we used `data.update(...)`, which would
write to that default value. This means that successive calls would include
data that wasn't intended.

This was hit when using 'rbt post -u CLN' to update a public review request
with a perforce repository. We'd update the review request resource with
'changenum', and then try to update the draft with 'public', but that would end
up also sending 'changenum' to the draft resource, which doesn't have that
attribute.

Testing done:
Reproduced the case in the bug. After this fix, I can use 'rbt post -u CLN' to
update and publish a review request all in one go.

Fixes bug 3197.

Reviewed at https://reviews.reviewboard.org/r/5269/
Fix a couple small style issues from my previous change.

This fixes up a couple issues that came in from review after I had pushed it.
Merge branch 'release-0.5.x'
Don't match Perforce repositories when outside the checkout.

We had a long-standing bug where if $P4PORT was set and `p4 info`
returned valid repository information, we'd consider that a match, even
if not within that Perforce checkout.

We now make use of the "Client root" field from `p4 info` and only match
a repository if we're within that Checkout somewhere.

If working with a nested repository where one checkout is within
another, and one type of repository is listed before another, then this
could still fail. That's, however, a larger problem that needs to be
solved across SCMClients.

Fixes bug #3171
Merge branch 'release-0.5.x'