##// END OF EJS Templates
caches: enable no-cache repos for certain scenarios where we explicitly don't need to cache things like gists etc.
marcink -
r3868:707232ae default
parent child Browse files
Show More
@@ -883,11 +883,12 b' class RepoModel(BaseModel):'
883 # TODO: johbo: Unify this, hardcoded "bare=True" does not look nice
883 # TODO: johbo: Unify this, hardcoded "bare=True" does not look nice
884 if repo_type == 'git':
884 if repo_type == 'git':
885 repo = backend(
885 repo = backend(
886 repo_path, config=config, create=True, src_url=clone_uri,
886 repo_path, config=config, create=True, src_url=clone_uri, bare=True,
887 bare=True)
887 with_wire={"cache": False})
888 else:
888 else:
889 repo = backend(
889 repo = backend(
890 repo_path, config=config, create=True, src_url=clone_uri)
890 repo_path, config=config, create=True, src_url=clone_uri,
891 with_wire={"cache": False})
891
892
892 repo.install_hooks()
893 repo.install_hooks()
893
894
@@ -226,8 +226,9 b' class ScmModel(BaseModel):'
226 raise RepositoryError('Duplicate repository name %s '
226 raise RepositoryError('Duplicate repository name %s '
227 'found in %s' % (name, path))
227 'found in %s' % (name, path))
228 elif path[0] in rhodecode.BACKENDS:
228 elif path[0] in rhodecode.BACKENDS:
229 klass = get_backend(path[0])
229 backend = get_backend(path[0])
230 repos[name] = klass(path[1], config=config)
230 repos[name] = backend(path[1], config=config,
231 with_wire={"cache": False})
231 except OSError:
232 except OSError:
232 continue
233 continue
233 log.debug('found %s paths with repositories', len(repos))
234 log.debug('found %s paths with repositories', len(repos))
@@ -432,11 +432,11 b' class TestRepoContainer(object):'
432
432
433 def _create_repo(self, dump_name, backend_alias, config):
433 def _create_repo(self, dump_name, backend_alias, config):
434 repo_name = '%s-%s' % (backend_alias, dump_name)
434 repo_name = '%s-%s' % (backend_alias, dump_name)
435 backend_class = get_backend(backend_alias)
435 backend = get_backend(backend_alias)
436 dump_extractor = self.dump_extractors[backend_alias]
436 dump_extractor = self.dump_extractors[backend_alias]
437 repo_path = dump_extractor(dump_name, repo_name)
437 repo_path = dump_extractor(dump_name, repo_name)
438
438
439 vcs_repo = backend_class(repo_path, config=config)
439 vcs_repo = backend(repo_path, config=config)
440 repo2db_mapper({repo_name: vcs_repo})
440 repo2db_mapper({repo_name: vcs_repo})
441
441
442 repo = RepoModel().get_by_repo_name(repo_name)
442 repo = RepoModel().get_by_repo_name(repo_name)
General Comments 0
You need to be logged in to leave comments. Login now