Fix post-review errors with --diff-only.

Review Request #1185 - Created Oct. 28, 2009 and submitted

Eric Huss
RBTools
reviewboard
If you run post-review with --diff-only, and there is an error, it is not handled properly.

For example: Remove your post-review cookie, and then try to update an existing review with --diff-only, it will crash with a KeyError (instead of giving you a login prompt).

(Note: looking at this diff does not display the whitespace changes, even if you click "Show Whitespace changes", which makes it a little hard to understand the change.)
Testing done against Perforce (using changesets).

- Posted a new review.
- Updated diff, (new diff displayed as expected).
- Updated diff with cookies removed, (forced login and updated diff as expected).
- Updated diff with --diff-only, (new diff displayed as expected).
- Updated diff with --diff-only with cookies removed, (forced login and updated diff as expected).
Christian Hammond
  1. Thanks Eric. Committed as r3bd73dd.
  2. 
      
Loading...