[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Incomplete xml output when using --xml to non-existent server

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Thu, 3 Mar 2016 15:42:14 +0100

On Thu, Mar 3, 2016 at 3:11 PM, Vincent Lefevre <vincent-svn_at_vinc17.net> wrote:
> On 2016-03-03 10:31:52 +0100, Johan Corveleyn wrote:
>> No, of course not :-). I just gave an example where the output was
>> broken (host not found), as opposed to another error condition (server
>> reponds "URL 'X' non-existent in revision Y") where the xml response
>> is still valid. Ignoring implementation (which I always do when I'm
>> arguing about behavior), this seems quite weird to me.
>
> No, this is different. In the former case, this is a server or
> communication problem: it is not possible to output the info
> because it is not possible to know what it is. In the latter case,
> the communication is successful, so that it is possible to output
> the info.

Agreed, it's different. But it's still weird / inconsistent IMO.

As I said, I don't know anything about the implementation of --xml,
but it seems to me that svn could easily complete the output by
closing the root element with "</info>". Apparently *something* goes
wrong executing the info request ... let's just cleanup nicely.

Another example, no server communication needed:

[[[
C:\>svn info --xml .
<?xml version="1.0" encoding="UTF-8"?>
<info>
svn: E155007: 'C:\' is not a working copy

]]]

But, go inside a working copy, and use a non-existing path:

[[[
C:\WorkingCopy>svn info --xml blah
<?xml version="1.0" encoding="UTF-8"?>
<info>
svn: warning: W155010: The node 'C:\WorkingCopy\blah' was not found.

</info>
svn: E200009: Could not display info for all targets because some
targets don't exist

]]]

Why </info> in one case and not in the other? As a user, I see no
reason for that.

-- 
Johan
Received on 2016-03-03 15:42:46 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.