Add --description-file=DESCRIPTION_FILE option to post-review

Review Request #597 — Created Oct. 19, 2008 and submitted

Information

Review Board SVN (deprecated)

Reviewers

Added --description-file=DESCRIPTION_FILE option to allow a text file
containg a lengthy review description to passed to post-review.

Added a check to confirm that --description-file and --description are not
both used as they are to be considered mutually exclusive.

Added a check to confirm that the specified file exists.
Tested the following:

post-review --help to confirm expected usage information is displayed.
post-review --description="cmd line dec" --descritpion-file="/tmp/test.txt" to confirm error generated if these mutually exclusive options are used together.
post-review --descritpion-file="/tmp/deoes_not_exist.txt" to confirm that an error is generated if the specified file doe not exist.
post-review --descritpion-file="/tmp/desc.txt" against a local server to confirm that a multi-line file with indendation appears as expected in the generated review.
chipx86
  1. Looks good. Committed as r1546 with some minor fixes noted below.
  2. Trailing whitespace in the string.
  3. We need to be sure to close this file handle.
  4. "file file", and we should use %s instead of putting the variable inline (so that we can localize the string later).
  5.