summaryrefslogtreecommitdiff
path: root/rbtools/tests.py
AgeCommit message (Collapse)Author
2010-02-06Be more flexible with HTTP response codes.Christian Hammond
post-review's HTTP GET/POST code always assumed that any Review Board API error code would be in an HTTP 200, and that anything else was an unknown failure. It's now more flexible and understands that any HTTP status code could have a JSON payload in it, and processes them accordingly. This introduces some new unit tests for testing the error parsing code paths. Reviewed at http://reviews.reviewboard.org/r/1375/
2009-11-03Improve git parent branch detection in post-review.Christian Hammond
This adds improved logic for determining the parent branch used when generating a diff. It will attempt to detect the merge base of the current head, falling back to defaults if necessary. A tracking branch can be manually specified too. The new code attempts the following: 1) Tries to detect the tracking branch for the current HEAD, if possible. 2) If a tracking branch doesn't exist, or is not remote, it will fall back on 'origin/master'. 3) If the --tracking-branch parameter is specified, this branch will be used instead of 'origin/master'. It also provides unit tests for post-review. Right now, these test only GitClient (in pure Git mode), but new tests can be added down the line for the rest of post-review. Patch by Dan Savilonis Reviewed at http://reviews.reviewboard.org/r/1144/