Always run svn log --xml non-interactively
Review Request #7205 — Created April 14, 2015 and submitted
We cannot run
svn log --xmlinteractively because the authentication
prompts are intermixed with thesvn logoutput. This results in
exceptions when attempting to parse the XML and leads to cryptic error
messages.This patch replaces all
svn log --xmlusage with non-interactive usage
and checks for a specific error code to determine if there was an
authentication error. Authentication errors are written to the console
with directions on how to rectify them using the SVN authenticaiton
command line options.
Ran unit tests.
Ran
rbt diffin an SVN repository with specific revisions with a
remote repository over HTTP with authentication. RBTools exited with
an error that prompted me to enter my SVN credentials on the
command-line.
- 
 
Would there be any value in running all svn commands with the --non-interactive option? I think the --svn-password and --svn-prompt-password options provided by rbt eliminate any real need to run in an interactive fashion, and as
svn log --xmlhas shown running in interactive mode can lead to problems.Along these lines, if this change was made then you might want to evaluate all svn commands for the E215004 error, which could possibly be more trouble than it is worth. As it stands now, I think the call to
svn log --xmlwill always be called first in any scenario where svn needs to access the remote server, and thus authentication issues always get checked and the user informed. But, in the future if there was a new svn command requiring remote access added prior to thesvn log --xmlcall then there could be authentication errors that are not explicitly obvious. - 
 
 
 - 
 
Should this also mention the forthcoming --svn-prompt-password option as an alternative to --svn-password?
 
 
Tool: PEP8 Style Checker Processed Files: rbtools/clients/svn.py rbtools/clients/errors.py Tool: Pyflakes Processed Files: rbtools/clients/svn.py rbtools/clients/errors.py