changeset 3636:ddc4c12f00fb beta

fixed issues with importing non-ascii repo names
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 29 Mar 2013 23:49:21 +0100
parents be78bf3b1a1f
children 58c2b54540d2
files rhodecode/model/db.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/model/db.py	Fri Mar 29 23:36:53 2013 +0100
+++ b/rhodecode/model/db.py	Fri Mar 29 23:49:21 2013 +0100
@@ -907,7 +907,7 @@
         # names in the database, but that eventually needs to be converted
         # into a valid system path
         p += self.repo_name.split(Repository.url_sep())
-        return os.path.join(*p)
+        return os.path.join(*map(safe_unicode, p))
 
     @property
     def cache_keys(self):
@@ -1062,13 +1062,15 @@
         if (cs_cache != self.changeset_cache or not self.changeset_cache):
             _default = datetime.datetime.fromtimestamp(0)
             last_change = cs_cache.get('date') or _default
-            log.debug('updated repo %s with new cs cache %s' % (self, cs_cache))
+            log.debug('updated repo %s with new cs cache %s'
+                      % (self.repo_name, cs_cache))
             self.updated_on = last_change
             self.changeset_cache = cs_cache
             Session().add(self)
             Session().commit()
         else:
-            log.debug('Skipping repo:%s already with latest changes' % self)
+            log.debug('Skipping repo:%s already with latest changes'
+                      % self.repo_name)
 
     @property
     def tip(self):