[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 10:31:52 +0100

On Thu, Mar 3, 2016 at 9:53 AM, Bert Huijben <bert_at_qqmail.nl> wrote:
>> -----Original Message-----
>> From: Johan Corveleyn [mailto:jcorvel_at_gmail.com]
...
>> Note that a failure to access a file / directory does *not* give this
>> problem. This incomplete xml only happens when there is a problem
>> accessing the *server* ("nonexistent" in my example).
>
> Did you really try all error conditions of 'svn status --xml' without '-u' ? :)

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.

I think it's reasonable to expect some consistency here, and
preferably "consistently *valid* output" :-).

It's especially weird in this case, because:

- Broken case: svn client knows *immediately* that something is wrong.
We're asking it to consult a URL, but it can't even contact the
server. Why does it even start to open an xml <info> element?

- Correct case: agreed, this is much more difficult, because svn is
already talking to the server (and possibly streaming output to the
user), and only finds out partway through that some targets don't
exist on the server (I think that's what happens anyway). But still,
svn gives valid xml output, yay!

-- 
Johan
Received on 2016-03-03 10:32:18 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.