##// END OF EJS Templates
fixed issue with logger crashing on mixed str and unicode
marcink -
r1973:0a46e8f1 beta
parent child Browse files
Show More
@@ -31,7 +31,7 b' from datetime import datetime'
31 from vcs.utils.lazy import LazyProperty
31 from vcs.utils.lazy import LazyProperty
32 from vcs.backends import get_backend
32 from vcs.backends import get_backend
33
33
34 from rhodecode.lib import safe_str
34 from rhodecode.lib import safe_str, safe_unicode
35 from rhodecode.lib.caching_query import FromCache
35 from rhodecode.lib.caching_query import FromCache
36 from rhodecode.lib.hooks import log_create_repository
36 from rhodecode.lib.hooks import log_create_repository
37
37
@@ -372,6 +372,7 b' class RepoModel(BaseModel):'
372 else:
372 else:
373 new_parent_path = ''
373 new_parent_path = ''
374
374
375 # we need to make it str for mercurial
375 repo_path = os.path.join(*map(lambda x:safe_str(x),
376 repo_path = os.path.join(*map(lambda x:safe_str(x),
376 [self.repos_path, new_parent_path, repo_name]))
377 [self.repos_path, new_parent_path, repo_name]))
377
378
@@ -384,8 +385,10 b' class RepoModel(BaseModel):'
384 if is_valid_repos_group(repo_path, self.repos_path):
385 if is_valid_repos_group(repo_path, self.repos_path):
385 raise Exception('This path %s is a valid group' % repo_path)
386 raise Exception('This path %s is a valid group' % repo_path)
386
387
387 log.info('creating repo %s in %s @ %s', repo_name, repo_path,
388 log.info('creating repo %s in %s @ %s' % (
388 clone_uri)
389 repo_name, safe_unicode(repo_path), clone_uri
390 )
391 )
389 backend = get_backend(alias)
392 backend = get_backend(alias)
390
393
391 backend(repo_path, create=True, src_url=clone_uri)
394 backend(repo_path, create=True, src_url=clone_uri)
General Comments 0
You need to be logged in to leave comments. Login now