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

What is the most simple way to use svn_stream_t?

From: Grigory Petrov <grigory.v.p_at_gmail.com>
Date: Wed, 2 Mar 2011 11:29:09 +0300


I need to programmatically get content of a specified revision of
versioned file. I think svn_client_cat2() will do a good job, but the
first parameter, "svn_stream_t* out" puzzles me a bit. I have read
about "streams" in corresponding header file (not a very long reading)
and it seems to be that using stream as output buffer for
svn_client_cat2() is terribly complicated: i need to create stream,
supply it to baton and read/write functions, write code for that
functions that will queue and dequeue bindary data to and from buffer
associated with baton... This seems to be a lot of code. Is it any way
to create a simple svn_stream_t* that will act as a memory buffer so i
can give it to svn_client_cat2() and on success just get all data
received as a single memory buffer?

Any comments and insights are welcome!

Received on 2011-03-02 09:29:48 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.