##// END OF EJS Templates
fixed issues with importing non-ascii repo names
marcink -
r3636:ddc4c12f beta
parent child Browse files
Show More
@@ -907,7 +907,7 b' class Repository(Base, BaseModel):'
907 # names in the database, but that eventually needs to be converted
907 # names in the database, but that eventually needs to be converted
908 # into a valid system path
908 # into a valid system path
909 p += self.repo_name.split(Repository.url_sep())
909 p += self.repo_name.split(Repository.url_sep())
910 return os.path.join(*p)
910 return os.path.join(*map(safe_unicode, p))
911
911
912 @property
912 @property
913 def cache_keys(self):
913 def cache_keys(self):
@@ -1062,13 +1062,15 b' class Repository(Base, BaseModel):'
1062 if (cs_cache != self.changeset_cache or not self.changeset_cache):
1062 if (cs_cache != self.changeset_cache or not self.changeset_cache):
1063 _default = datetime.datetime.fromtimestamp(0)
1063 _default = datetime.datetime.fromtimestamp(0)
1064 last_change = cs_cache.get('date') or _default
1064 last_change = cs_cache.get('date') or _default
1065 log.debug('updated repo %s with new cs cache %s' % (self, cs_cache))
1065 log.debug('updated repo %s with new cs cache %s'
1066 % (self.repo_name, cs_cache))
1066 self.updated_on = last_change
1067 self.updated_on = last_change
1067 self.changeset_cache = cs_cache
1068 self.changeset_cache = cs_cache
1068 Session().add(self)
1069 Session().add(self)
1069 Session().commit()
1070 Session().commit()
1070 else:
1071 else:
1071 log.debug('Skipping repo:%s already with latest changes' % self)
1072 log.debug('Skipping repo:%s already with latest changes'
1073 % self.repo_name)
1072
1074
1073 @property
1075 @property
1074 def tip(self):
1076 def tip(self):
General Comments 0
You need to be logged in to leave comments. Login now