David James wrote:
> On 8/5/05, Blair Zajac <blair@orcaware.com> wrote:
>
>>Do the new bindings support the same interface as the old bindings, so
>>that scripts can be use unmodified?
>
> Yes. All 1.2.x scripts should work on 1.3.x. If they don't, file a bug
> report :) It's a good idea to try your 1.2.x scripts now on the
> python-bindings-improvements branch, so we can be sure that everything
> is compatible.
OK. I'll give my scripts a shot on the branch.
> I'd definitely like to see some of the 1.3.x fixes also go into 1.2.x
> so that users of the old bindings can benefit. Do you have ideas on
> which fixes would be appropriate for 1.2.x?
I would at least like to see all of the svn_client_*() functions
available to the client. Some are missing.
>>BTW, I recently tried to write a Python script where I could have used
>>svn_client_info(), but the callback and baton haven't been properly
>>handled in SWIG, like svn_client_log(), so it's unusable. Do the new
>>bindings handle svn_client_info() so this portion can be back-ported?
>
> I haven't worked on that yet. Send me some sample code, and I'll try
> to make it work.
Here's some sample code. The first problem is that svn_client_info()
takes your standard receiver and baton, while the Python function should
take one argument less.
svn_error_t *
svn_client_info (const char *path_or_url,
const svn_opt_revision_t *peg_revision,
const svn_opt_revision_t *revision,
svn_info_receiver_t receiver,
void *receiver_baton,
svn_boolean_t recurse,
svn_client_ctx_t *ctx,
apr_pool_t *pool);
#!/usr/bin/python
import svn.core
import svn.client
pool = svn.core.svn_pool_create(None)
ctx = svn.client.svn_client_create_context(pool)
rev = svn.core.svn_opt_revision_t()
rev.kind = svn.core.svn_opt_revision_head
def info_receiver(*args):
print args
r = svn.client.svn_client_info('http://svn.collab.net/repos/svn',
rev,
rev,
info_receiver,
None,
0,
ctx,
pool
)
print r
When I try to run this, I get
Traceback (most recent call last):
File "./t.py", line 21, in ?
pool
TypeError: argument number 4: a 'svn_info_receiver_t' is expected,
'function(<function info_receiver at 0xb7e20cdc>)' is received
Regards,
Blair
--
Blair Zajac, Ph.D.
<blair@orcaware.com>
Subversion and Orca training and consulting
http://www.orcaware.com/svn/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Aug 10 05:52:43 2005