[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 03:44:12 CET

Greg Hudson <ghudson@MIT.EDU> writes:

> Ben committed:
> > + 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!
>
> You do realize that svn_txdelta_stream_t isn't currently a generic
> interface, right? svn_txdelta_next_window always does the same thing,
> which involves reading from source and target byte streams.

Oh crud.

The problem I have is simple: I have an svn_string_t. I want to
stash its contents in a repository file, and the *only* interface for
this is svn_fs_apply_textdelta. As usual, this interface expects me
to push txdelta windows at a consumer routine.

This is an awful amount of work for such a seemingly simple task.

Jim pointed out that I won't be the last person who wants to do this,
so I thought the prototype above would be a good general solution:
convert an svn_string_t into a txdelta_stream. But Greg points out
that our machinery isn't generalized enough for this.

Instead, what if we had a func that converted an svn_string_t into a
*single* window containing a solitary `new' op? Then I could push the
one window, then push a NULL, and be done.

Thoughts?
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.