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

Re: Mark/seek/reset problems in svn_subst_stream_translated()

From: Stefan Sperling <stsp_at_elego.de>
Date: Thu, 15 Apr 2010 17:59:37 +0200

On Thu, Apr 15, 2010 at 11:28:13AM -0400, Greg Stein wrote:
> I'd suggest that we simply remove mark/seek/reset from the translated stream.

We could not handle keywords or newlines during patching if we did that.

> (I was never comfortable with that extension to our streams in the
> first place, and I don't see a reason that all streams must implement
> them)

What is the alternative?

I used streams because the general trend was to go away from passing
around naked APR file handles. I had to add some features to streams
to use them for what I wanted to use them. So streams are used for
more and more things and the original abstraction is being bent.

I don't really mind which way it's done, but we need some way of
supporting the features we want to support.
For patch, that means either using streams that support reading
ranges from a file, support transformation on lines read from
the stream, and have mark/seek/reset, or using naked APR
files and passing around file handles and range information.

Realistically speaking, at this stage in the development cycle
I'd much rather fix the mark/seek/reset support for translated
streams than rewrite a lot of svn patch.

And I guess some people won't be happy if we make patch use raw
files instead of streams (e.g. Bert suggested the public patch API
should accept a stream to read the patch from, rather than accept
an APR file as it does now).

Stefan
Received on 2010-04-15 18:00:12 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.