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

Re: svn commit: rev 7515 - trunk/subversion/bindings/swig/python/svn

From: Greg Stein <gstein_at_lyra.org>
Date: 2003-10-24 23:49:37 CEST

On Fri, Oct 24, 2003 at 12:23:28PM -0500, cmpilato@tigris.org wrote:
>...
> +++ trunk/subversion/bindings/swig/python/svn/fs.py Fri Oct 24 12:23:27 2003
> @@ -77,28 +77,30 @@
> return 1
> return 0
>
> + def _dump_contents(self, file, root, path, pool):
> + fp = open(file, 'w+')
> + if path is not None:
> + stream = file_contents(root, path, pool)
> + while 1:
> + chunk = core.svn_stream_read(stream, core.SVN_STREAM_CHUNK_SIZE)
> + if not chunk:
> + break
> + fp.write(chunk)
> + fp.close()

Hm. This bug existed before, but the diff made me think of it :-)
Shouldn't there be a call to core.svn_stream_close(stream) in there?
Wrapped into a try/finally.

Are streams auto *closed* at pool clear time? Seems that their memory is
just dropped.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Oct 24 23:55:17 2003

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.