##// END OF EJS Templates
caches: make sure we init caches on repo names withou '/' to not create a new cache subpath
super-admin -
r4766:77c2f985 default
parent child Browse files
Show More
@@ -168,7 +168,7 b' class FileNamespaceBackend(PickleSeriali'
168 try:
168 try:
169 super(FileNamespaceBackend, self).__init__(arguments)
169 super(FileNamespaceBackend, self).__init__(arguments)
170 except Exception:
170 except Exception:
171 log.error('Failed to initialize db at: %s', db_file)
171 log.exception('Failed to initialize db at: %s', db_file)
172 raise
172 raise
173
173
174 def __repr__(self):
174 def __repr__(self):
@@ -186,7 +186,7 b' class RemoteRepo(object):'
186 self.stream_url = remote_maker.stream_url
186 self.stream_url = remote_maker.stream_url
187 self._session = remote_maker._session_factory()
187 self._session = remote_maker._session_factory()
188 self._cache_region, self._cache_namespace = \
188 self._cache_region, self._cache_namespace = \
189 remote_maker.init_cache_region(repo_id)
189 remote_maker.init_cache_region(self._repo_id_sanitizer(repo_id))
190
190
191 with_wire = with_wire or {}
191 with_wire = with_wire or {}
192
192
@@ -209,6 +209,9 b' class RemoteRepo(object):'
209
209
210 self.cert_dir = get_cert_path(rhodecode.CONFIG.get('__file__'))
210 self.cert_dir = get_cert_path(rhodecode.CONFIG.get('__file__'))
211
211
212 def _repo_id_sanitizer(self, repo_id):
213 return repo_id.replace('/', '__')
214
212 def __getattr__(self, name):
215 def __getattr__(self, name):
213
216
214 if name.startswith('stream:'):
217 if name.startswith('stream:'):
@@ -940,7 +940,8 b' class RepoModel(BaseModel):'
940 if landing_rev_name.startswith('branch:'):
940 if landing_rev_name.startswith('branch:'):
941 landing_rev_name = landing_rev_name.split('branch:')[-1]
941 landing_rev_name = landing_rev_name.split('branch:')[-1]
942 scm_instance = repo.scm_instance()
942 scm_instance = repo.scm_instance()
943 return scm_instance._remote.set_head_ref(landing_rev_name)
943 if scm_instance:
944 return scm_instance._remote.set_head_ref(landing_rev_name)
944
945
945 def _create_filesystem_repo(self, repo_name, repo_type, repo_group,
946 def _create_filesystem_repo(self, repo_name, repo_type, repo_group,
946 clone_uri=None, repo_store_location=None,
947 clone_uri=None, repo_store_location=None,
General Comments 0
You need to be logged in to leave comments. Login now