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

Re: CVS update: subversion/subversion/include svn_delta.h

From: Ben Collins-Sussman <sussman_at_newton.ch.collab.net>
Date: 2001-03-01 00:36:25 CET

Greg Stein <gstein@lyra.org> writes:

> On Wed, Feb 28, 2001 at 11:06:19PM -0000, sussman@tigris.org wrote:
> >...
> > /* Set *STREAM to a pointer to a delta stream that will turn an empty
> > - bytestream into STRING. */
> > + bytestream into STRING. Do necessary allocation in POOL.
> > +
> > + When we call `svn_txdelta_next_window' on *STREAM, the window
> > + returned will contain pointers directly into STRING (rather than
> > + duplicating STRING's data.) So callers beware: make sure STRING
> > + is not freed before STREAM and its windows! */
> > void svn_txdelta_from_string (svn_txdelta_stream_t **stream,
> > svn_string_t *string,
> > apr_pool_t *pool);
>
> That first sentence doesn't make sense. What does "empty bytestream" have to
> do with anything? And we aren't putting anything "into" STRING, are we?
>
> It seems more like this is a way to *read* a txdelta stream *from* a string,
> right?

Right.

I'm just trying to stick to the definition of a "txdelta_stream",
copying from the declaration above it.

The stream produces a series of windows which converts some "source"
bytestring into a "target" bytestring, right? The "target" we want
the consumer to construct is STRING. So what's the "source" in this
case? If the windows are full of nothing but `new' ops, then the
source is nothing. We're telling the consumer how to construct STRING
from nothingness.

Isn't this a consistent analogy?
Received on Sat Oct 21 14:36:23 2006

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.