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

Re: [PATCH] "svnadmin dump": An optional XML output format.

From: Branko Čibej <brane_at_xbc.nu>
Date: 2002-12-22 15:17:28 CET

David Summers wrote:

> The property contents are XML escaped. The file-content is
> XML escaped if it is text and is base64 encoded if it is binary
> (anything with svn:mime-type property where the property value doesn't
> start with "text").
>
*bonk*
Property contents can be binary, too. So you'd have to base64 them,
because we don't have meta-data for props. Special-caseing text vs.
binary files is also a bit dubious; who's going to read your XML dump?
If its people, good luck to them. If it's programs, I suspect base64
coding is faster than XML escaping.

>+ /* Only binary if we find svn:mime-type = application/octet-stream */
>
Not good, as I pointed out elsewhere. And I think your code does
something else than your commend says. :-)

>+ /* If the key is "svn:mime-type" and the value != text then
>+ it is binary. */
>+ if (strncmp((const char *) key, "svn:mime-type",
>+ keylen < 13 ? keylen : 13) == 0 &&
>+ strncmp(value->data, "text",
>+ value->len < 4 ? value->len : 4) != 0)
>+ *binary = TRUE;
>
You should be using the svn_mime_type_is_binary function.

That's all beside the point, though. I fail to see how an XML format is
better than our existing dump format.

(Dumping logs in XML is different -- there are lots of useful uses for
XML-dumped log messages.)

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Dec 22 15:18:06 2002

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.