changeset 694:e32ed1802478

subvertpy: set default username/pwd as with swig Fixes wrong user name being used for pushed commits.
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
date Wed, 15 Sep 2010 17:50:30 +0200
parents 03dca55abec9
children 066b9c8e500e
files hgsubversion/svnwrap/subvertpy_wrapper.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnwrap/subvertpy_wrapper.py
+++ b/hgsubversion/svnwrap/subvertpy_wrapper.py
@@ -204,6 +204,10 @@ class SubversionRepo(object):
         ]
 
         auth = ra.Auth(providers)
+        if self.username:
+            auth.set_parameter(subvertpy.AUTH_PARAM_DEFAULT_USERNAME, self.username)
+        if self.password:
+            auth.set_parameter(subvertpy.AUTH_PARAM_DEFAULT_PASSWORD, self.password)
 
         self.remote = ra.RemoteAccess(url=self.svn_url.encode('utf-8'),
                                       client_string_func=getclientstring,