Allow "rbt patch --print" to be run outside of a build tree.

Review Request #8592 — Created Jan. 4, 2017 and submitted — Latest diff uploaded

Information

RBTools

Reviewers

If one runs "rbt patch --server <server-URL> --print <rid>" outside of a build tree, the following error message is displayed:
CRITICAL:root:Values instance has no attribute 'repository_url'

This is caused by the patch command always initializing the SCM tool and needing to check for respository info on the Review Board server matching the local ones.

When using the --print option (outputting to stdout) to the patch command, there is no need to verify the repository info. Therefore, this change avoids both initializing the SCM tool and doing the respository info check when the patch_stdout is set in the patch command options.

Tested by using --print option to patch command to fetch various diffs from review requests in local Review Board instance, both inside and outside of build trees. The diff was displayed in both combination, if a diff existed in a review with the specified review ID.

Also used the patch command without the --print option to apply patches to build trees for projects checked out from Subversion or cloned from Git repositories that also had reviews in the local Review Board instance.

Lastly, used the patch command without the --print option outside of a build tree in order to ensure proper error messages are displayed. The following error message was displayed:
ERROR: The current directory does not contain a checkout from a supported source code repository.