Had a small question on the code you had sent out earlier
Say, If I were to use the sample given below as follows:
The my question is what should history_cb have. And how do I get access
to the log messages.
Seems like I need to create a log receiver object however, I have no
clue as to how I need to create it. Any help in that or any example of
how this has been used should do the trick for me.
Thanks and regards
- Aditya Gandhi
[mailto:email@example.com] On Behalf Of C. Michael Pilato
Sent: Wednesday, June 30, 2004 8:13 PM
To: Aditya Gandhi
Cc: Ben Collins-Sussman; firstname.lastname@example.org
Subject: Re: client side python APIs to access repos over https
"Aditya Gandhi" <email@example.com> writes:
> Hi Ben,
> Thanks for this info.
> I have also been trying some of this however it does not seem to
> I have two questions.
> 1. What API needs to be used to login (https access). Do we have any
> sample scripts available for the same?
Unfortunately, it's not possible right now to use any of the prompting
callbacks for auth. You'll need to populate your
~/.subversion/servers file with passwords and such, or get your
authstuffs cached by just using Subversion to commit something against
> 2. I am not able to use the svn_client_log method. Do we have some
> examples available for the same? In case examples are not available
> somebody can help me complete / correct the code below that will be
Here's a class in a script I've been developing. You might have to
tweak it a bit, but the general knowledge you need will be there.
Implementation of the HistoryParser class for doing history
calculations across RA layers (client-side).
def __init__(self, repos_url):
# Init the client app.
# Create our top-level pool.
pool = core.svn_pool_create(None)
# Ensure the we have a configuration area.
# Setup the client context baton, complete with non-prompting
ctx = client.svn_client_ctx_t()
provs = 
ctx.auth_baton = core.svn_auth_open(provs, pool)
ctx.config = core.svn_config_get_config(None, pool)
# Start populating our members.
self.pool = pool
self.repos_url = repos_url
self.ctx = ctx
def _rev2optrev(self, rev):
# Turn a revision argument into an svn_opt_revision_t object.
rt = core.svn_opt_revision_t()
if rev is not None:
if str(rev) == 'HEAD':
rt.kind = core.svn_opt_revision_head
rt.kind = core.svn_opt_revision_number
rt.value.number = int(rev)
rt.kind = core.svn_opt_revision_unspecified
def fetchHistory(self, start, end, history_cb):
# Run svn_client_log(START, END) using HISTORY_CB as the callback.
1, 0, history_cb, self.ctx, self.pool)
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Mon Jul 5 17:07:08 2004