changeset 5746:e5f525856315

vcs: the git backend requires string encoded repository names too Shown by test.functional.test_admin_repos.test_delete_non_ascii on Windows.
author domruf <dominikruf@gmail.com>
date Thu, 03 Mar 2016 14:19:06 +0100
parents 83dbf427f1dc
children b5bef0b39209
files kallithea/model/db.py
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/model/db.py	Wed Mar 02 18:51:58 2016 +0100
+++ b/kallithea/model/db.py	Thu Mar 03 14:19:06 2016 +0100
@@ -1463,15 +1463,14 @@
         return _c(rn)
 
     def __get_instance(self):
-        repo_full_path = self.repo_full_path
-
-        alias = get_scm(safe_str(repo_full_path))[0]
+        repo_full_path = safe_str(self.repo_full_path)
+        alias = get_scm(repo_full_path)[0]
         log.debug('Creating instance of %s repository from %s',
-                  alias, repo_full_path)
+                  alias, self.repo_full_path)
         backend = get_backend(alias)
 
         if alias == 'hg':
-            repo = backend(safe_str(repo_full_path), create=False,
+            repo = backend(repo_full_path, create=False,
                            baseui=self._ui)
         else:
             repo = backend(repo_full_path, create=False)