Always run svn log --xml non-interactively
Review Request #7205 — Created April 14, 2015 and submitted
We cannot run
svn log --xml
interactively because the authentication
prompts are intermixed with thesvn log
output. This results in
exceptions when attempting to parse the XML and leads to cryptic error
messages.This patch replaces all
svn log --xml
usage 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 diff
in 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 --xml
has 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 --xml
will 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 --xml
call 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?