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

RE: svn commit: r40378 - in trunk/subversion: include libsvn_subr tests/libsvn_subr

From: Bert Huijben <rhuijben_at_sharpsvn.net>
Date: Thu, 5 Nov 2009 09:33:57 +0100

> -----Original Message-----
> From: Hyrum K. Wright [mailto:hyrum_at_hyrumwright.org]
> Sent: donderdag 5 november 2009 5:00
> To: svn_at_subversion.tigris.org
> Subject: svn commit: r40378 - in trunk/subversion: include libsvn_subr
> tests/libsvn_subr
>
> Author: hwright
> Date: Wed Nov 4 20:00:08 2009
> New Revision: 40378
>
> Log:
> Add a duplication facility to our stream toolbox. Along the lines of
> the tee(1), the new svn_stream_tee() function returns a stream which,
> when
> written to, writes to both of the underlying streams. This allows
> writing
> two files simultaneously, or writing a file while also pushing content
> across the network.
>
> This isn't used directly by this commit, but I envision a couple of
> uses down
> the road. In any case, it's a potentially useful tool, and a nice
> exercise while stuck in an aluminum tube.
>
> * subversion/libsvn_subr/stream.c
> (baton_tee, write_handler_tee, svn_stream_tee): New.

I think it would be useful to add a close handler, to allow closing the inner streams via the outer stream.

In libsvn_wc/adm_crawler.c there is a variant of this stream code. It writes all bytes that are read from another stream. (Search for copying_stream). It would be nice if we could combine these into one generic feature. (But currently I don't see how)

        Bert

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2414637
Received on 2009-11-05 09:34:16 CET

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.