Simon Perreault wrote:
> Hi,
>
> In a mod_python context, I wrote the following code, where req is the
> Apache
> request object:
>
> ---------------------------------------------------------
> [...]
> req.content_type = 'text/plain'
>
> stream = svn_stream_create(req, pool)
> svn_stream_set_write(stream, write)
> svn_client_cat(stream, url, revision, ctx, pool)
>
> return apache.OK
>
> def write(req, data):
> req.write(data)
> ---------------------------------------------------------
>
> This way, I hope to be able to stream the data to the web browser as it
> gets
> written to the stream by Subversion. However, I'm getting the following
> error:
>
> ---------------------------------------------------------
> stream = svn_stream_create(req, pool)
> TypeError: Expected a pointer
> ---------------------------------------------------------
svn_stream_create is not useful from bindings languages - in fact, it has
been removed entirely from the 1.2.x bindings.
Just pass your req object directly to svn_client_cat. Any object which
supports the following method signature will work:
<theobject>.write(<string, Unicode or any read buffer compatible object>)
Max.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Feb 20 18:34:03 2005