Output a better error message when running rbt patch --print
Review Request #9490 — Created Jan. 16, 2018 and discarded — Latest diff uploaded
When running
rbt patch --printoutside of a repository directory and
without providing the--serverparameter or having a~/.reviewboardrc
file containingREVIEWBOARD_URL, the command would output that the
current directory does not contain a supported repository.The command is expected to work outside these repository directories. By
improving the error handling inrbtools/clients/__init__.pyand in
rbtools/commands/patch.pywe can output a more precise error message.
Tested
rbt patch --printboth inside and outside of directories with
.reviewboardrcfiles, as well as using--server. Manually verified
other functions callinginitialize_scm_toolwill continue to function
as is and bubble up the new exceptions being raised.