You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@lyra.org> on 2003/05/21 01:50:55 UTC

Re: svn commit: rev 5996 - trunk/subversion/libsvn_client

On Tue, May 20, 2003 at 01:26:57PM -0500, cmpilato@tigris.org wrote:
>...
>   (apply_textdelta): Use the file baton's pool to store the tmpfile
>     and its path.

How about: keep the file in the handler pool, and rely on that to auto close
the file when the handler is done. Then strdup the path into the file baton.
You'd eliminate the need to store the pool in the baton (as that pool
sitting there could lead to Badness).

>...
> +  /* Was a txdelta even sent? */
> +  if (! fb->tmppath)
> +    return SVN_NO_ERROR;

This case isn't ever supposed to happen, right? We should be getting text
for every file added... ?  The 'if' statement kind of creates a false sense
of "this might happen"

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

Re: svn commit: rev 5996 - trunk/subversion/libsvn_client

Posted by cm...@collab.net.
Garrett Rooney <ro...@electricjellyfish.net> writes:

> On Tuesday, May 20, 2003, at 09:50 PM, Greg Stein wrote:
> 
> > On Tue, May 20, 2003 at 01:26:57PM -0500, cmpilato@tigris.org wrote:
> >> ...
> >>   (apply_textdelta): Use the file baton's pool to store the tmpfile
> >>     and its path.
> >
> > How about: keep the file in the handler pool, and rely on that to
> > auto close
> > the file when the handler is done. Then strdup the path into the
> > file baton.
> > You'd eliminate the need to store the pool in the baton (as that pool
> > sitting there could lead to Badness).

So predictable...  Ben and I were joking about how you'd say this.  In
fact, I was actually going to do it this way.  Ben stopped me, though,
saying that that was how things had been before, and they were
purposely changed ... he just couldn't remember why.

> The original reason the file was moved to the baton was so we could
> explicitly close it (flushing data to disk) before doing a
> copy-and-translate.  If you move it to any pool, be sure that the
> auto-close happens before that occurs.

And there's the "why".

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 5996 - trunk/subversion/libsvn_client

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Tuesday, May 20, 2003, at 09:50 PM, Greg Stein wrote:

> On Tue, May 20, 2003 at 01:26:57PM -0500, cmpilato@tigris.org wrote:
>> ...
>>   (apply_textdelta): Use the file baton's pool to store the tmpfile
>>     and its path.
>
> How about: keep the file in the handler pool, and rely on that to auto 
> close
> the file when the handler is done. Then strdup the path into the file 
> baton.
> You'd eliminate the need to store the pool in the baton (as that pool
> sitting there could lead to Badness).

The original reason the file was moved to the baton was so we could 
explicitly close it (flushing data to disk) before doing a 
copy-and-translate.  If you move it to any pool, be sure that the 
auto-close happens before that occurs.

-garrett


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org