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

Re: Q regarding svn_io_open_unique_file and persistent files

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2004-12-24 19:25:31 CET

On Thu, 2004-12-23 at 01:58, Ph. Marek wrote:
> - shall the file be opened with delete_on_close=FALSE?
> -> If an SVN_ERR() cancels this function, the temporary file is left and
> takes space in the filesystem.

You can set a pool cleanup handler which removes the file, and then
cancel the cleanup handler when the file is ready to be preserved.

There are examples of this in libsvn_wc/repos_diff.c and
libsvn_wc/diff.c; search for apr_pool_cleanup_kill. It's a fair amount
of code; perhaps it should be abstracted out somewhere, either in
Subversion or in APR. (It feels a little too generic for Subversion,
but a little too fiddly for APR, so I don't have a strong opinion.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Dec 24 19:26:58 2004

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.