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

Help using python bindings (svn_client_blame)

From: Stefan Haller <haller_at_ableton.com>
Date: 2004-09-19 15:27:30 CEST

Hi,

I'm doing my first experiments using the python bindings, and haven't
had much success yet.

For example, the following simple script fails with this error:

Traceback (most recent call last):
  File "/tmp/blame", line 21, in ?
    svn.client.svn_client_blame(path, rev1, rev2, blame_receiver, None, ctx, pool)
TypeError: Expected a pointer

I have the feeling it must be a real beginner's error, but it's not easy
to find help about how to use the bindings. (BTW, there is supposed to
be API documentation available at <http://svn.collab.net/svn-doxygen/>,
but I get access denied there.)

Thanks for any help.

#!/usr/bin/env python

import svn.core
import svn.client

path = "http://svn.collab.net/repos/svn/README"

rev1 = svn.core.svn_opt_revision_t()
rev1.kind = svn.core.svn_opt_revision_number
rev1.value = 1
rev2 = svn.core.svn_opt_revision_t()
rev2.kind = svn.core.svn_opt_revision_head
rev2.value = 0

def blame_receiver(baton, line_no, revision, author, date, line, pool):
  print author, revision, line

pool = svn.core.svn_pool_create(None)
ctx = svn.client.svn_client_create_context(pool)

svn.client.svn_client_blame(path, rev1, rev2, blame_receiver, None, ctx, pool)

-- 
Stefan Haller
Ableton
http://www.ableton.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Sep 19 15:27:54 2004

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.