[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Of SWIG Python bindings and batons provided via void** arguments

From: Charles Duffy <cduffy_at_spamcop.net>
Date: 2007-02-22 03:35:14 CET

Howdy, all.

I'm looking to use svn_ra_do_diff2() from the SWIG bindings, but I don't
see how to do it: Even in trunk, this method's docstring indicates that
it is just a direct passthrough to the C method:

def svn_ra_do_diff2(*args):
     svn_ra_do_diff2(svn_ra_session_t session, svn_ra_reporter2_t reporter,
         void report_baton, svn_revnum_t revision,
         char diff_target, svn_boolean_t recurse, svn_boolean_t
         svn_boolean_t text_deltas,
         char versus_url, svn_delta_editor_t diff_editor,
         void diff_baton, apr_pool_t pool) -> svn_error_t
   return apply(_ra.svn_ra_do_diff2, args)

At issue here is the report_baton: What Python object can I pass in this
spot (and then later use as a parameter to reporter->foo() methods)?
There is no native type corresponding to a void*, at least that I'm
aware of.

I'm interested only in copies, deletes and property changes -- not text
diffs -- so the client.* bindings (and higher-level tools provided by
pysvn) don't appear to be useful to me. I have code which does what I
want using an editor driven by repos.dir_delta() [patterned off the
useful example provided in svnlook.py]; my intent here is to add support
for working against a remote URL, but it's appearing so far to be
significantly more difficult than I've bargained for.

Any pointers as to approaches I've missed would be greatly appreciated.
Thank you!

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Feb 22 03:36:05 2007

This is an archived mail posted to the Subversion Dev mailing list.