===========================
RBTools 0.4.0 Release Notes
===========================

**Release date**: February 26, 2012


Features
========

post-review
-----------

* Defaults for many parameters can now be specified in :file:`.reviewboardrc`.

  Many of the parameters passed to post-review can now be set in a
  repository's or user's :file:`.reviewboardrc` file. These include:

  ENABLE_PROXY, PUBLISH, OPEN_BROWSER, TARGET_GROUPS, TARGET_PEOPLE,
  GUESS_FIELDS, GUESS_SUMMARY, GUESS_DESCRIPTION, BRANCH, SUBMIT_AS, USERNAME,
  PASSWORD, PARENT_BRANCH, TRACKING_BRANCH, P4_CLIENT, P4_PORT, P4_PASSWD,
  DEBUG, HTTP_USERNAME, and HTTP_PASSWORD.

* Added a ``--disable-proxy`` option for disabling the HTTP(S) proxy
  server.

  Some systems are configured to use a proxy server, which can get in the
  way of using a local Review Board server. By using the
  ``--disable-proxy`` option, this proxy server will by bypassed.

  This can also be configured by setting ``ENABLE_PROXY = False`` in
  :file:`.reviewboardrc`.


Bug Fixes
=========

post-review
-----------

* Fixed authentication problems when accessing the API.

  We were comparing the URL when deciding whether to prompt for authentication
  This wasn't correct and would sometimes break. We now compare the "realm"
  (part of Basic HTTP authentication) instead.

* Shows a nicer error when trying to update someone else's review request.
  (:bug:`2465`)

  When trying to post a change to a review request owned by someone else
  (and without the permissions to make changes to it), post-review would
  print an error saying that the review request exists but the diff is not
  attached.

  We now look for the Permission Denied error code and we tell the user
  that they don't have permission instead.

* Fixed crashes when the home directory wasn't writable. (:bug:`2344`)

* Fixed using ``--diff-filename=-`` without a valid cookie. (:bug:`2052`)

  When using ``--diff-filename=-``, there was a check to make sure that
  users wouldn't have to type their username and password (since this is
  fetching data from STDIN). However, it didn't take into account that
  there might be a cookie set with that authentication information. Now
  we use that if available.

* Fixed the link to the Repository Configurations documentation. (:bug:`2482`)


Git
---

* Fixed problems when using ``--repository-url``.

  There were a few problems when using ``--repository-url`` with Git.
  There would be an ``UnboundLocalError``, crashing post-review, and
  it wouldn't set the upstream branch, causing failures later. It also was
  completely ignored for git-svn.

  Patches by Bartek Celary and Vaclav Slavik. (:bug:`2410`)


Mercurial
---------

* Make Mercurial handle the case where there are no outgoing changes.

  If there were no outgoing changes in a Mercurial repository, we would
  crash. Now we bail gracefully.

  Patch by Mark Catley.

* Improve merge support in order to generate better diffs. (:bug:`2311`)

  The logic for generating diffs didn't properly account for merges in
  the tree. Upstream revisions in a merge were being ignored, and only
  upstream revisions on the current branch would be used for determining
  the beginning and ending range of the diff. Now those in a merge are
  factored in as well, making for more accurate diffs.

  Patch by Mark Catley.


Perforce
--------

* Using ``--revision-range`` on Perforce now provides better errors.
  (:bug:`1495`)

  We don't support ``--revision-range`` on Perforce. Trying to use
  this was causing a confusing error message. Now we have a friendly
  error.

  Patch by Mike Conley.

* Display an informative error if GNU diff isn't installed. (:bug:`2352`)

  When using Perforce, things would break if GNU diff wasn't installed.
  There's now an informative error that explains what to do.

  Patch by Gyula Faller.

* Fix handling of new files in post-commit scenarios. (:bug:`2369`)

  Added files were assumed to not have any revisions yet. While true
  for pre-commit reviews, it wasn't necessarily true for post-commit.
  Now, if a file is added, we explicitly request its first revision,
  rather than getting the last revision.

  Patch by Gyula Faller.


Internal Changes
================

* Split out SCMClients into their own files.

  post-review historically was one self-contained file, with support for
  various tools being implemented as SCMClient classes inside post-review.
  These have been split out into individual files, which later will allow
  us to add pluggable SCMClient support to post-review, as well as allow
  other tools to make use of these SCMClients.

  This is the first big step toward turning RBTools into an API that
  third-party applications can use.

  Patch by Alexander Solovets.


Contributors
============

* Alexander Solovets
* Bartek Celary
* Christian Hammond
* David Trowbridge
* Gyula Faller
* Mark Catley
* Mike Conley
* Vaclav Slavik
