Define REVISION_CHANGESET_PREFIX

Trivial fix to a stupid mistake.
git client fails if core.bare is unset

Sometimes git repositories are configured without core.bare being set (using
git repo tool for example, or using msysgit on windows). The current rbtools
git client implementation breaks in this situation.

Additionally, core.bare can be either "1" or "true". This change adds "1" to
the list of values checked.

Testing Done:
post successfully this draft review
* with core.bare = false from .git/config
* without core.bare = false from .git/config

Bugs closed: 3213

Reviewed at https://reviews.reviewboard.org/r/5342/
List git commits in reverse order.

When posting a branch with many commits, it's likely that the first one is the
most important one (with the best description), and the later ones are fixups.
This change alters extract_summary and extract_description to reflect that.
This also brings us into line with how the hg client works.

Testing done:
Created a branch with several commits and posted it. Saw that the summary was
that of the first commit, and that the commits were listed in chronological
rather than reverse chronological order.

Fixes bug 3163.

Reviewed at https://reviews.reviewboard.org/r/5347/
Add p4_* arguments to 'diff' and 'status' commands.

The p4 client uses these arguments, but they weren't included in the command
line options for the 'diff' or 'status' commands. Trivial change.
Release RBTools 0.5.6.
Merge branch 'release-0.5.x'
Clearcase often fails in multi-site mode because oids are not yet available on server

When people are submitting a review request, the oid of the old file version
and new file version are sent and used to retrieve the filename. However, the
new filename is usually not yet synced.

This change replaces revision /streamname/0 by its clearcase predecessor, i.e.
parentstream/N (N is origin revision of file in parent stream). This doesn't
completely fix the problem, but reduces the number of errors. A matching change
in reviewboard handles the rest of the errors.

Testing done:
Created a clearcase review request using --ucm-activity (which is a pending
change) in a fresh stream (containing /streamname/0 versions).

Fixes bug 3183.

Reviewed at https://reviews.reviewboard.org/r/5184/
Mention that users might need to install GNU Diff.

For some SCMs, users (particularly on windows) will need to install GNU diff
themselves. This change mentions this in the installation docs and links to an
installer. While I was in here I also mentioned Mac OS X alongside Linux.

Testing done: Built html docs and checked that links worked.

Fixes bug 2058.
Pass p4 port, client, and password on the command line instead of using env.

The p4 client prefers, in order, arguments on the command line, .p4config
settings, and finally P4* environment variables. This meant that if someone had
a .p4config file, and then specified --p4-port and --p4-client with something
different, it wouldn't actually override their file.

I've changed the client implementation to use -p, -c, and -P arguments to 'p4'
instead of setting things in the environment.

Testing done: Ran unit tests.

Fixes bug 2712.

Reviewed at https://reviews.reviewboard.org/r/5363/
Add setup-repo documentation to the index.

The documentation for the setup-repo command was included in the tree
but was not specified in the index.txt, preventing it from appearing in
the list of commands. The documentation page was reachable by URL, but
not really discoverable.
Merge branch 'release-0.5.x'
Remove duplicate --p4-* options from 'rbt diff'.

We fixed a bug with missing options twice on different branches, which meant
when we merged, we ended up with these defined twice. Trivial fix.
Make sure svn revisions are strings before passing them to Popen.

The SVN revision code could possibly pass in an int in the list of arguments
when invoking 'svn status' (and other svn commands). This change forces
revisions as arguments to be strings.

Testing done: Smoke tested posting with svn.

Reviewed at https://reviews.reviewboard.org/r/5369/
Allow specifying the basedir via .reviewboardrc

We are using different branches in bzr and do not want to flood the
repository-table in RB. Simply adding the basedir as BASEDIR parameter to
reviewboardrc solves our problem.

Reviewed at https://reviews.reviewboard.org/r/5366/
Fix typo in "rbt close".

This is a trivial fix for a typo in an error raised by "rbt close". For
example, it currently displays "Request request #<id> is already submitted"
instead of "Review request #<id> is already submitted".

Reviewed at https://reviews.reviewboard.org/r/5379/
Improve our usage of --no-ext-diff with git.

At some point in the past, we added --no-ext-diff to the git command line. This
was intended to make things work when people had set their diff tool to
something that didn't produce a diff, such as graphical tools like 'p4merge'.
Unfortunately, this removes a bunch of functionality with legitimate uses.

This change adds a flag for .reviewboardrc, GIT_USE_EXT_DIFF, which can be set
to True to allow using external diff commands.

Testing done:
Posted some changes with git using --debug. Saw that without the config
setting, it passed --no-ext-diff on the command lin, and with it, it didn't.

Fixes bug 1524.
Fix perforce posting from subdirectories of the client root.

The logic that checked whether we were inside a p4 client was adding
os.path.pathsep to the path name instead of os.path.sep. This meant that we'd
only match if the cwd was the client root.

Testing done:
* Made a subdirectory in a p4 client and posted a change.

Fixes bug 3218.

Reviewed at https://reviews.reviewboard.org/r/5390/
Merge branch 'release-0.5.x'
Release RBTools 0.5.7.
Merge branch 'release-0.5.x'