improve scriptability of post-commit
Review Request #212 — Created Jan. 25, 2008 and discarded — Latest diff uploaded
* post_review separated from __main__ to allow importing from other scripts such as post-commit hook; allows any command-line option to be set programatically in call to post_review method * adds --submit-as option * adds --repository option; allows empty basedir for repo diffs * includes json responses in debug mode * consolidates .reviewboardrc loading into one place in __main__ * allow use of -c (--revision) with svn and removed -c as a weird special case in parse_options; removed --revision-range: reviewing multiple revisions in svn makes as little sense as in p4 * generalizes and expands request field setting in mutable_request_fields * allows any (long-form) command-line option to be set in .reviewboardrc (backwards incompatibility: this means "REVIEWBOARD_URL" in .reviewboardrc should now be just "server"); if also specified on command-line, command-line takes precedence I've included this as a diff against post-review but the name needs to be changed to make it importable (hyphens are not legal in a module name). I used the obvious "post_review.py"