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

Re: looking for python ra_dav sample code

From: Stephen White <swhite-svn_at_decisionsoft.com>
Date: 2003-07-14 17:39:10 CEST

---- Original Message ----
> From Jens-Uwe Mager <jum@anubis.han.de>
> Date: Sunday, 13 Jul 2003, 13:04
>
> I am looking for some boiler plate sample code for accessing a remote
> repository via the svn python api. I have been looking through the
> sample python scripts like mailer.py but these use local access. Is
> there some sample code to copy from?

Here is a sample I was playing with a short time ago.

#!/usr/bin/python

from svn import wc, util, client

pool = util.svn_pool_create(None)

# create a list of authentication providers for the auth baton

providers = [
  #client.svn_client_get_simple_prompt_provider(pool),
  client.svn_client_get_simple_provider(pool),
  client.svn_client_get_simple_provider(pool)
  ]

auth_baton = util.svn_auth_open(providers, pool)

client_ctx = client.new_svn_client_ctx_t()

client.svn_client_ctx_t_auth_baton_set(client_ctx, auth_baton) # This accessor may change

rev = util.new_svn_opt_revision_t()
util.svn_opt_revision_t_kind_set(rev, util.svn_opt_revision_head)

#client.svn_client_checkout("file:///my/rep",
# "trunk",
# rev,
# 1, #recursive
# client_ctx,
# pool)
print client.svn_client_ls("http://svn.dsl.local/svn",rev,0,client_ctx,pool)

-- 
Stephen White                               +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jul 14 17:40:19 2003

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

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