Skip to content
Snippets Groups Projects
Commit ed2898a2 authored by Georges Racinet's avatar Georges Racinet
Browse files

tests.common: made minimal config importable from tests

parent 0553eabf
No related branches found
Tags 0.8.1
2 merge requests!48Draft: RefService: DeleteRefs,!47GitLab Special refs
......@@ -10,6 +10,8 @@
from ..stub.shared_pb2 import Repository
MINIMAL_HG_CONFIG = dict(extensions=dict(topic='', evolve=''))
def make_empty_repo(storages_root, relative_path=None, storage='default',
extra_extensions=()):
......@@ -30,7 +32,7 @@
if relative_path is None:
relative_path = 'repo-' + hex(random.getrandbits(64))[2:]
repo_path = storages_root / storage / relative_path
config = dict(extensions=dict(topic='', evolve=''))
config = MINIMAL_HG_CONFIG
config['extensions'].update((ext, '') for ext in extra_extensions)
wrapper = LocalRepoWrapper.init(repo_path, config=config)
wrapper.write_hgrc(config)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment