changeset 233:80a700398995

Fix SubversionRepo to actually use provided username
author Daniel Tang <dytang@cs.purdue.edu>
date Mon, 06 Apr 2009 02:50:22 -0400
parents c0063328587f
children 33e885f5f86a
files svnwrap/svn_swig_wrapper.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/svnwrap/svn_swig_wrapper.py
+++ b/svnwrap/svn_swig_wrapper.py
@@ -120,7 +120,7 @@ class SubversionRepo(object):
     """
     def __init__(self, url='', username=''):
         self.svn_url = url
-        self.uname = username
+        self.username = username
         self.auth_baton_pool = core.Pool()
         self.auth_baton = _create_auth_baton(self.auth_baton_pool)
 
@@ -139,6 +139,10 @@ class SubversionRepo(object):
         """
         # while we're in here we'll recreate our pool
         self.pool = core.Pool()
+        if self.username:
+            core.svn_auth_set_parameter(self.auth_baton,
+                                        core.SVN_AUTH_PARAM_DEFAULT_USERNAME,
+                                        self.username)
         self.client_context = client.create_context()
 
         self.client_context.auth_baton = self.auth_baton