[Tutor] How do to an svn checkout using the svn module?

Stephen Nelson-Smith sanelson at gmail.com
Fri Mar 9 12:43:35 CET 2007


On 3/9/07, Kent Johnson <kent37 at tds.net> wrote:

> Did you find the pysvn Programmer's Guide that comes with pysvn? It has
> this example:

Ah.. no.... I haven't got pysvn installed... but will take a look.

What I do have is:

>>> import sys
>>> import svn.core
>>> import svn.client
>>> import sys
>>> pool = svn.core.svn_pool_create(None)
>>> svn.core.svn_config_ensure( None, pool )
>>> ctx = svn.client.svn_client_ctx_t()
>>> config = svn.core.svn_config_get_config( None, pool )
>>> ctx.config = config
>>> rev = svn.core.svn_opt_revision_t()
>>> rev.kind = svn.core.svn_opt_revision_head
>>> rev.number = 0
>>> ctx.auth_baton = svn.core.svn_auth_open( [], pool )
>>> url = "https://svn.uk.delarue.com/repos/prdrep/prddoc/"
>>> path ="/tmp"
>>> svn.client.svn_client_checkout(url, path, rev, 0, ctx, pool)

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
libsvn._core.SubversionException: ("PROPFIND request failed on
'/repos/prdrep/prddoc'", 175002)

Not sure what I am doing wrong... the url is correct.

> Kent

S.


More information about the Tutor mailing list