subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Shahaf <danie...@apache.org>
Subject Re: svn commit: r1227828 - in /subversion/trunk/tools/examples: SvnCLBrowse get-location-segments.py
Date Thu, 05 Jan 2012 21:30:34 GMT
C. Michael Pilato wrote on Thu, Jan 05, 2012 at 16:00:50 -0500:
> On 01/05/2012 03:54 PM, danielsh@apache.org wrote:
> > Author: danielsh
> > Date: Thu Jan  5 20:54:09 2012
> > New Revision: 1227828
> > 
> > URL: http://svn.apache.org/viewvc?rev=1227828&view=rev
> > Log:
> > Fix the swig-py examples.
> > 
> > When trying to run the get-location-segments.py, it throws:
> > 
> >     TypeError: Unexpected NULL parent pool on proxy object
> > 
> > Somehow, the "_parent_pool" property wasn't initialized on the context.
> > Not sure how this works, but creating a context using
> > client.svn_client_create_context() instead of client.ctx_t() (which
> > subversion/bindings/swig/python/tests/pool.py also does) fixes this
> > error and makes the example work again.
> 
> I'm not sure what changed since the days when this construct worked, but
> I've seen exactly this symptom (and exactly this solution) before in another
> context[1], so ... +1.
> 

In 1.7 the struct has two new members (->wc_ctx and ->conflict_func2)
which the constructor function unconditionally initializes to non-NULL
values.

These are the only members added since 1.5.  Virtually all other struct
members are allowed to be NULL.  (A few of them are not explicitly
documented as alowing NULL: ->auth_baton, ->notify_func, ->cancel_func.)

</brian dump of potentially relevant observations>

> -- C-Mike
> 
> [1] The context should hint that "context" here doesn't refer to the
>     problematic context object.  ┬┐Comprendes?
> 
> -- 
> C. Michael Pilato <cmpilato@collab.net>
> CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
> 



Mime
View raw message