Hi all,
A colleague of mine ran into this, and I'm wondering if it's expected
behavior or a bug:
For certain commands with the --xml option, the xml output is
incomplete when sending the request to a non-existent server. This can
cause an issue for tools that try to parse the output into some data
structure, and expect correct XML (even though the command has exited
with an error).
For instance, 'svn info' and 'svn ls' behave thusly (maybe other
commands as well):
[[[
C:\>svn info --xml https://nonexistent/svn
<?xml version="1.0" encoding="UTF-8"?>
<info>
svn: E170013: Unable to connect to a repository at URL 'https://nonexistent/svn'
svn: E731001: No such host is known.
C:\>svn ls --xml https://nonexistent/svn
<?xml version="1.0" encoding="UTF-8"?>
<lists>
<list
path="https://nonexistent/svn">
svn: E170013: Unable to connect to a repository at URL 'https://nonexistent/svn'
svn: E731001: No such host is known.
]]]
(The 'svn: Exxx' warnings are printed to stderr, while the incomplete
xml output is printed to stdout)
Contrast this with another failing request, when accessing a
*non-existent directory* on an existing server:
[[[
C:\>svn info --xml https://realserver/svn/asdf
<?xml version="1.0" encoding="UTF-8"?>
<info>
svn: warning: W170000: URL 'https://realserver/svn/asdf' non-existent
in revision 316895
</info>
svn: E200009: Could not display info for all targets because some
targets don't exist
C:\>svn ls --xml https://realserver/svn/asdf
<?xml version="1.0" encoding="UTF-8"?>
<lists>
<list
path="https://realserver/svn/asdf">
svn: warning: W160013: URL 'https://realserver/svn/asdf' non-existent
in revision 316895
</list>
</lists>
svn: E200009: Could not list all targets because some targets don't exist
]]]
--
Johan
Received on 2016-03-02 15:05:58 CET