From c21fa62c77eee01829a1da4845ea1294c2242442 Mon Sep 17 00:00:00 2001
From: Nicolas Delaby <nicolas@nexedi.com>
Date: Mon, 14 Mar 2011 16:05:26 +0000
Subject: [PATCH] Older versions of pysvn returns unicode instead of string.
 Force encoding into utf-8

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44253 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5VCS/SubversionClient.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/product/ERP5VCS/SubversionClient.py b/product/ERP5VCS/SubversionClient.py
index 217cfd0e86..27e55d12c7 100644
--- a/product/ERP5VCS/SubversionClient.py
+++ b/product/ERP5VCS/SubversionClient.py
@@ -141,6 +141,11 @@ try:
       if not username or not password:
         self.client.setException(SubversionLoginError(realm))
         return False, '', '', False
+      # BBB. support older versions of pysvn <= 1.6.3
+      if isinstance(user, unicode):
+        user = user.encode('utf-8')
+      if isinstance(password, unicode):
+        password = password.encode('utf-8')
       return True, user, password, False
   
   class NotifyCallback(Callback):
-- 
2.30.9