caches: enable no-cache repos for certain scenarios where we explicitly don't need to cache things like gists etc.
This commit is contained in:
parent
ef6dc3ca17
commit
f7c67dc6d9
3 changed files with 9 additions and 7 deletions
|
|
@ -883,11 +883,12 @@ class RepoModel(BaseModel):
|
|||
# TODO: johbo: Unify this, hardcoded "bare=True" does not look nice
|
||||
if repo_type == 'git':
|
||||
repo = backend(
|
||||
repo_path, config=config, create=True, src_url=clone_uri,
|
||||
bare=True)
|
||||
repo_path, config=config, create=True, src_url=clone_uri, bare=True,
|
||||
with_wire={"cache": False})
|
||||
else:
|
||||
repo = backend(
|
||||
repo_path, config=config, create=True, src_url=clone_uri)
|
||||
repo_path, config=config, create=True, src_url=clone_uri,
|
||||
with_wire={"cache": False})
|
||||
|
||||
repo.install_hooks()
|
||||
|
||||
|
|
|
|||
|
|
@ -226,8 +226,9 @@ class ScmModel(BaseModel):
|
|||
raise RepositoryError('Duplicate repository name %s '
|
||||
'found in %s' % (name, path))
|
||||
elif path[0] in rhodecode.BACKENDS:
|
||||
klass = get_backend(path[0])
|
||||
repos[name] = klass(path[1], config=config)
|
||||
backend = get_backend(path[0])
|
||||
repos[name] = backend(path[1], config=config,
|
||||
with_wire={"cache": False})
|
||||
except OSError:
|
||||
continue
|
||||
log.debug('found %s paths with repositories', len(repos))
|
||||
|
|
|
|||
|
|
@ -432,11 +432,11 @@ class TestRepoContainer(object):
|
|||
|
||||
def _create_repo(self, dump_name, backend_alias, config):
|
||||
repo_name = '%s-%s' % (backend_alias, dump_name)
|
||||
backend_class = get_backend(backend_alias)
|
||||
backend = get_backend(backend_alias)
|
||||
dump_extractor = self.dump_extractors[backend_alias]
|
||||
repo_path = dump_extractor(dump_name, repo_name)
|
||||
|
||||
vcs_repo = backend_class(repo_path, config=config)
|
||||
vcs_repo = backend(repo_path, config=config)
|
||||
repo2db_mapper({repo_name: vcs_repo})
|
||||
|
||||
repo = RepoModel().get_by_repo_name(repo_name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue