On Fri, 2010-03-05, Greg Stein wrote:
> The filename should be absolute, based on an absolute directory name.

Yup, the output filename should be, because the implementation of
svn_io_open_unique_file3() gives an abspath if it gets one...

> Another optimization would be the removal of the get_absolute() on
> exit.

... but since the doc string of svn_io_open_unique_file3() doesn't
promise that, and since the use of this get_empty_tmp_file() function is
inefficient in other ways, I'm not inclined to do that.

Instead I'm adding a comment about those inefficiencies. (r920356.)

- Julian



> On Thu, Mar 4, 2010 at 12:13,  <[email protected]> wrote:
> > Author: julianfoad
> > Date: Thu Mar  4 17:13:42 2010
> > New Revision: 919074
> >
> > URL: http://svn.apache.org/viewvc?rev=919074&view=rev
> > Log:
> > Revert my bogus "fix" of r919065.
> >
> > * subversion/libsvn_wc/update_editor.c
> >  (get_empty_tmp_file): Allocate the file object in scratch_pool. I was
> >    thinking the file persists and is returned to the caller ... but that's
> >    only the actual file; the apr_file_t object is temporary.
> >
> > Found by: rhuijben
> >
> > Modified:
> >    subversion/trunk/subversion/libsvn_wc/update_editor.c
> >
> > Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
> > URL: 
> > http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=919074&r1=919073&r2=919074&view=diff
> > ==============================================================================
> > --- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
> > +++ subversion/trunk/subversion/libsvn_wc/update_editor.c Thu Mar  4 
> > 17:13:42 2010
> > @@ -430,7 +430,7 @@
> >                                          scratch_pool, scratch_pool));
> >   SVN_ERR(svn_io_open_unique_file3(&file, tmp_filename, temp_dir_path,
> >                                    svn_io_file_del_none,
> > -                                   result_pool, scratch_pool));
> > +                                   scratch_pool, scratch_pool));
> >   SVN_ERR(svn_io_file_close(file, scratch_pool));
> >
> >   return svn_error_return(svn_dirent_get_absolute(tmp_filename, 
> > *tmp_filename,
> >
> >
> >


Reply via email to