On Fri, Oct 31, 2014 at 06:54:25PM +0000, Eric Wong wrote:
> The attached script using get_dir fails with SVN 1.8.10-3 in unstable.
> The SVN package in Debian stable (1.6.17dfsg-4+deb7u6) is fine.
> I get the following failure:
> 
>     Incorrect parameters given: Could not convert '%ld' into a number at ...
> 
> I expect something like the following output (which 1.6.17 gives me):

This can actually be seen just by running “svn ls
http://www.virtualbox.org/svn/vbox/trunk/COPYING”.  It happens when
running ls against any file in that repo.  The problem is that the
server is returning an invalid value for the getcontentlength property
of the DAV request:

...
PROPFIND /svn/vbox/!svn/bc/53112/trunk/COPYING HTTP/1.1
Host: www.virtualbox.org
User-Agent: SVN/1.8.10 (x86_64-pc-linux-gnu) serf/1.3.7
Content-Type: text/xml
Accept-Encoding: gzip
DAV: http://subversion.tigris.org/xmlns/dav/svn/depth
DAV: http://subversion.tigris.org/xmlns/dav/svn/mergeinfo
DAV: http://subversion.tigris.org/xmlns/dav/svn/log-revprops
Depth: 0
Transfer-Encoding: chunked

12d
<?xml version="1.0" encoding="utf-8"?><propfind 
xmlns="DAV:"><prop><resourcetype xmlns="DAV:"/><getcontentlength 
xmlns="DAV:"/><deadprop-count 
xmlns="http://subversion.tigris.org/xmlns/dav/"/><version-name 
xmlns="DAV:"/><creationdate xmlns="DAV:"/><creator-displayname 
xmlns="DAV:"/></prop></propfind>
0

HTTP/1.1 207 Multi-Status
Date: Sat, 01 Nov 2014 03:59:48 GMT
Server: Oracle-Application-Server-11g
Content-Length: 670
Content-Type: text/xml; charset="utf-8"
Content-Language: en

<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:" 
xmlns:ns1="http://subversion.tigris.org/xmlns/dav/"; xmlns:ns0="DAV:">
<D:response xmlns:lp1="DAV:" 
xmlns:lp2="http://subversion.tigris.org/xmlns/dav/";>
<D:href>/svn/vbox/!svn/bc/53112/trunk/COPYING</D:href>
<D:propstat>
<D:prop>
<lp1:resourcetype/>
<lp1:getcontentlength>%ld</lp1:getcontentlength>
<lp2:deadprop-count>1</lp2:deadprop-count>
<lp1:version-name>35198</lp1:version-name>
<lp1:creationdate>2010-12-16T16:24:25.075872Z</lp1:creationdate>
<lp1:creator-displayname>vboxsync</lp1:creator-displayname>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>


The <lp1:getcontentlength> node should have a number, not %ld.  In SVN
1.6.x, when libsvn_subr tried to convert “%ld” to a number, it didn't
check errno afterward and just used the returned value of 0.  In 1.8.x,
SVN actually checks errno and reports (albeit badly) that the value
isn't a proper number.

Cheers,
-- 
James
GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <[email protected]>

Attachment: signature.asc
Description: Digital signature

Reply via email to