On 12 March 2014 18:17, Gareth McCaughan <gareth.mccaug...@lightblueoptics.com> wrote: > Ivan Zhakov wrote: > >> It looks like serious issue. Could you please file issue in Subversion >> issue tracker: http://subversion.tigris.org/issues > > Done. Issue #4478. > Gareth, thanks a lot!
It seems we have second reason to create temporary files in target WC directory, instead of .svn/tmp. Another problem we had before is inherited ACL on Windows discussed year ago: http://mail-archives.apache.org/mod_mbox/subversion-dev/201309.mbox/%3C20130928110059.d1bb8d007dfe7b26cbcb4f719cb77fd6.be88925bf6.wbe%40email16.secureserver.net%3E I've prepared stupid patch to create temporary files in WC, instead of .svn/tmp and it seems working fine. -- Ivan Zhakov
Index: subversion/libsvn_wc/workqueue.c =================================================================== --- subversion/libsvn_wc/workqueue.c (revision 1577065) +++ subversion/libsvn_wc/workqueue.c (working copy) @@ -476,6 +476,7 @@ const svn_checksum_t *checksum; apr_hash_t *props; apr_time_t changed_date; + svn_error_t *err; local_relpath = apr_pstrmemdup(scratch_pool, arg1->data, arg1->len); SVN_ERR(svn_wc__db_from_relpath(&local_abspath, db, wri_abspath, @@ -564,17 +565,32 @@ scratch_pool); } + temp_dir_abspath = svn_dirent_dirname(local_abspath, scratch_pool); +#if 0 /* Where is the Right Place to put a temp file in this working copy? */ SVN_ERR(svn_wc__db_temp_wcroot_tempdir(&temp_dir_abspath, db, wcroot_abspath, scratch_pool, scratch_pool)); +#endif /* Translate to a temporary file. We don't want the user seeing a partial file, nor let them muck with it while we translate. We may also need to get its TRANSLATED_SIZE before the user can monkey it. */ - SVN_ERR(svn_stream__create_for_install(&dst_stream, temp_dir_abspath, - scratch_pool, scratch_pool)); + err = svn_stream__create_for_install(&dst_stream, temp_dir_abspath, + scratch_pool, scratch_pool); + if (err && APR_STATUS_IS_ENOENT(err->apr_err)) + { + svn_error_clear(err); + SVN_ERR(svn_io_make_dir_recursively(temp_dir_abspath, scratch_pool)); + SVN_ERR(svn_stream__create_for_install(&dst_stream, temp_dir_abspath, + scratch_pool, scratch_pool)); + } + else if (err) + { + return svn_error_trace(err); + } + /* Copy from the source to the dest, translating as we go. This will also close both streams. */ SVN_ERR(svn_stream_copy3(src_stream, dst_stream,