Return-Path: X-Original-To: apmail-subversion-dev-archive@minotaur.apache.org Delivered-To: apmail-subversion-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9786D18FED for ; Wed, 2 Mar 2016 18:07:41 +0000 (UTC) Received: (qmail 72163 invoked by uid 500); 2 Mar 2016 18:07:41 -0000 Delivered-To: apmail-subversion-dev-archive@subversion.apache.org Received: (qmail 72105 invoked by uid 500); 2 Mar 2016 18:07:41 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 72095 invoked by uid 99); 2 Mar 2016 18:07:41 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Mar 2016 18:07:41 +0000 Received: from zulu.local (unknown [77.234.149.122]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id C7E9F1A010E for ; Wed, 2 Mar 2016 18:07:38 +0000 (UTC) Subject: Re: Incomplete xml output when using --xml to non-existent server To: dev@subversion.apache.org References: From: =?UTF-8?Q?Branko_=c4=8cibej?= Organization: The Apache Software Foundation Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAADBQTFRF IhsbCy0qZjoVOVRoeFxSAIKBzXQiAKaibYiewnk7nn9z0qCTgL3i87Ep6Kx/+tHBsrE+zgAAAjZJ REFUOMvF0jFoE1EYB/CzjWlqIzaTjqVIBifRRWyG0t5iUqlLyFpCeXBgKg5yq6A4degUDJjoUDpc 1Qt4Ux94B11SOLB0KGS4discpbkORTCn9/m9d3fvLhXnvuHu3f+Xx/veyyfZfLSdZHzgicSfeyw4 JISwdz8FT6M8lM8Ceg385Dlhs+cC9sQCDn0B78QCogzwN+sxfHGOIXBbRGkNAM4cZymGtgNsDPgz cByxon3EEm1TLmvAlghoHOO3CZSa+IQ/vF6JV8tgKOMow78gRgL2/+EIvATOUtB3SSdMg4GXgrbn uk0uLiGdoCHKbX4E+t1FUTqn1AtIdPJebssDQ64YANSQyyaQNyUOFs0ijMsMFnOPTahPLXKYowtY 08MfCP7vR7hRnc5zmPK7CDYYbHcbC7tHuyFA94U/1LYZaJpu/sxACHMwvwZljTLY0TbNk4x+zuEt yC3MfCM6uSIvfwur0itFL4FA2Yal8BzLfnYV4EIGwEPAk7o5zIcnvzHMEjwJrrhAKK7on6IrsfRJ 7A53BhaK+CL7fj6+q/sPeOvcDTtoZTxpUYsFeIknrOXep3p3l7Ua+8sZ5FPQKyKwWi+DfROTU7ny C1/9UhpeY7K287WJCzbsNPQm2S6Yk4PSCNhWM2r3nD0K9liYb6yPgCRJhSzPrxUK0yUBVk1VX0lj s7MzGZyp0wImMK/e8rHbz2soL+O+2r1dxfGsAmBcx0lNjS/RUhlUC7gRn1wGMdQ7Vw1/AReW/RN3 xFWdAAAAAElFTkSuQmCC Message-ID: <56D72BE5.7040203@apache.org> Date: Wed, 2 Mar 2016 19:07:33 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 02.03.2016 15:05, Johan Corveleyn wrote: > 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 > > > 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 > > > 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) This is clearly a bug; stdout should be either empty, or valid XML. In this case I suspect that we're printing the generic XML header too soon. -- Brane