How to catch prompts with PySVN?

Posted by Geoff on Stack Overflow See other posts from Stack Overflow or by Geoff
Published on 2010-04-12T20:50:32Z Indexed on 2010/04/12 20:53 UTC
Read the original article Hit count: 375

Filed under:
|

I'm new to Python and PySVN in general, and I'm trying to export my SVN repository using pysvn. Here's my code:

#set up svn login data
def svn_credentials (realm, username, may_save):
return True, svn_login_name, svn_login_password, False

#establish connection
svn_client = pysvn.Client ()
svn_client.callback_get_login = svn_credentials

#export data
svn_client.export('server-path-goes-here', 'client-path-goes-here', force=True

Which works fine, but if the password is wrong or the user name is unknown, this code just sits. I believe it's being presented with a user login prompt on the SVN side, but I'm at a loss as to how to check whats happening with callback_get_login. Any help would be greatly appreciated.

© Stack Overflow or respective owner

Related posts about python

Related posts about pysvn