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

Re: Getting delta content length

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Thu, 24 Jun 2010 09:44:25 -0400

Ramkumar Ramachandra wrote:
> Hi,
>
> We're working on a project to replay revisions using the replay API
> and dump a deltified dumpfile to stdout on-the-fly without using a
> filesystem backing. Althought the md5sum seems to be available through
> svn_txdelta_apply, the length of the delta doesn't seem to be. Without
> this length, we cannot generate a valid dumpfile (since the parser
> needs the content length information) - the current workaround is to
> load the whole stream into memory and measure its length, but this is
> highly inefficient. Is there any other way?

IIRC, Subversion is calculating that delta on the fly, so it can't exactly
hand you up-front the length thereof. Could you use a temporary file on
disk (and a stat() call for the filesize) instead of in-memory storage as
your go-between?

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
Received on 2010-06-24 15:45:09 CEST

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.