You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "C. Michael Pilato" <cm...@collab.net> on 2005/10/20 16:22:30 UTC

Re: svn commit: r16852 - trunk/subversion/libsvn_ra_dav

lundblad@tigris.org writes:

> Author: lundblad
> Date: Thu Oct 20 09:53:23 2005
> New Revision: 16852

[...]

> Fix issue #2247: Ra_dav leaks when reusing session.  In short, don't
> use the session pool for temporary stuff, which means most stuff, actually.
> 
> * subversion/libsvn_ra_dav/log.c (svn_ra_dav__get_log): 
> * subversion/libsvn_ra_dav/file_revs.c (svn_ra_dav__get_file_revs):
>   Allocae from the pool provided by the caller.

"Allocate" (sp)

> * subversion/libsvn_ra_dav/fetch.c
>   (report_baton_t): Add pool and in_resource members, change
>   current_wcprop_path to a stringbuf.
>   (svn_ra_dav__get_locations): Use caller-provided pool for temporary stuff.
>   (start_element): Use rb->pool instead of the session pool.
>   When allocating file pools, don't use the session pool, but instead
>   the parent directory pool.
>   Set rb->in_resource to true when setting rb->current_wcprop_path
>   (there is no NULL value any longer).

Just a nit -- this is why I highly endorse indentation in log
messages.  "(there is no NULL ..." looks like a symbol name.  I
prefer:

   * subversion/libsvn_ra_dav/fetch.c
     (report_baton_t): Add pool and in_resource members, change
       current_wcprop_path to a stringbuf.
     (svn_ra_dav__get_locations): Use caller-provided pool for temporary stuff.
     (start_element): Use rb->pool instead of the session pool.
       When allocating file pools, don't use the session pool, but instead
       the parent directory pool.
       Set rb->in_resource to true when setting rb->current_wcprop_path
       (there is no NULL value any longer).

Again, just a nit.

>   (end_element): Set rb->in_resource to FALSE at the end of a resource
>   element.  Allocate in rb->pool instead of that poor session pool, who should
>   really start feeling lonely at this point.
>   Adjust check for if we are instide a resource element to use in_resource.

"inside" (sp)

Nice work, Peter.  At super-quick glance, the change looks good.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

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

Re: svn commit: r16852 - trunk/subversion/libsvn_ra_dav

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Thu, 20 Oct 2005, C. Michael Pilato wrote:

> lundblad@tigris.org writes:
>
> [...]
>
> > * subversion/libsvn_ra_dav/fetch.c
> >   (report_baton_t): Add pool and in_resource members, change
> >   current_wcprop_path to a stringbuf.
> >   (svn_ra_dav__get_locations): Use caller-provided pool for temporary stuff.
> >   (start_element): Use rb->pool instead of the session pool.
> >   When allocating file pools, don't use the session pool, but instead
> >   the parent directory pool.
> >   Set rb->in_resource to true when setting rb->current_wcprop_path
> >   (there is no NULL value any longer).
>
> Just a nit -- this is why I highly endorse indentation in log

Se the propedit for how I "fixed" this:-)

> messages.  "(there is no NULL ..." looks like a symbol name.  I
> prefer:
>
>    * subversion/libsvn_ra_dav/fetch.c
>      (report_baton_t): Add pool and in_resource members, change
>        current_wcprop_path to a stringbuf.
>      (svn_ra_dav__get_locations): Use caller-provided pool for temporary stuff.
>      (start_element): Use rb->pool instead of the session pool.
>        When allocating file pools, don't use the session pool, but instead
>        the parent directory pool.
>        Set rb->in_resource to true when setting rb->current_wcprop_path
>        (there is no NULL value any longer).
>
Yes, I agree. Let's see if I switch my style:-) It is a balance between
how much time you spend on log message formatting and the chance of
misunderstandings.

> Nice work, Peter.  At super-quick glance, the change looks good.
>
>
thanks for having a look and being my spell checker:-(

Regards,
//Peter

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

Re: svn commit: r16852 - trunk/subversion/libsvn_ra_dav

Posted by Branko Čibej <br...@xbc.nu>.
C. Michael Pilato wrote:

>Just a nit -- this is why I highly endorse indentation in log
>messages.  "(there is no NULL ..." looks like a symbol name.  I
>prefer:
>
>   * subversion/libsvn_ra_dav/fetch.c
>     (report_baton_t): Add pool and in_resource members, change
>       current_wcprop_path to a stringbuf.
>  
>
[...]

Yep. I'd prefer to see people write log messages the way *I* write them, 
too.

:) :)

-- Brane


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