Skip to content
Snippets Groups Projects
Commit d2b101bafc33 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

make-reference: include the roles section in the benchrepo

The roles are important we should include them in order to be able to use them.
parent dbceefc6ee37
No related branches found
No related tags found
No related merge requests found
......@@ -145,6 +145,8 @@
contents = read_yaml(partial_sets_file_path)
data["partial-sets"] = contents["partial-sets"]
if "roles" in contents:
data["roles"] = contents["roles"]
# Write data to the benchrepo file
with open(repo_details, "w") as repo_details_file:
......
......@@ -98,6 +98,12 @@
repo-hash: 2b380e39
repo-prefix: my-reference-I-2b380e39
source: some-dir/my-source-repo
roles:
pull:
noop:
same:
source: reference
target: same
$ cat my-reference-I-d9c2fe76.benchrepo
partial-sets:
......@@ -128,6 +134,12 @@
repo-hash: d9c2fe76
repo-prefix: my-reference-I-d9c2fe76
source: some-dir/my-source-repo
roles:
pull:
noop:
same:
source: reference
target: same
Call the function to get the ASV variants
-----------------------------------------
......@@ -171,7 +183,9 @@
'visible': 53},
'repo-hash': '2b380e39',
'repo-prefix': 'my-reference-I-2b380e39',
'source': 'some-dir/my-source-repo'}},
'source': 'some-dir/my-source-repo'},
'roles': {'pull': {'noop': {'same': {'source': 'reference',
'target': 'same'}}}}},
'my-reference-I-d9c2fe76': {'partial-sets': {'missing-last-10': {'remove': 'last(all(), 10)'},
'same': None},
'reference-repo': {'enabled': True,
......@@ -192,7 +206,9 @@
'visible': 53},
'repo-hash': 'd9c2fe76',
'repo-prefix': 'my-reference-I-d9c2fe76',
'source': 'some-dir/my-source-repo'}}},
'source': 'some-dir/my-source-repo'},
'roles': {'pull': {'noop': {'same': {'source': 'reference',
'target': 'same'}}}}}},
{('my-reference-I', (('repo-format-compression', 'zlib'), ('repo-format-compression-level', 'default'), ('repo-format-dotencode', True), ('repo-format-fncache', True), ('repo-format-generaldelta', False), ('repo-format-plain-cl-delta', True), ('repo-format-sparserevlog', False))): 'my-reference-I-2b380e39',
('my-reference-I', (('repo-format-compression', 'zlib'), ('repo-format-compression-level', 'default'), ('repo-format-dotencode', True), ('repo-format-fncache', True), ('repo-format-generaldelta', True), ('repo-format-plain-cl-delta', True), ('repo-format-sparserevlog', False))): 'my-reference-I-d9c2fe76'},
['missing-last-10', 'same'])
......@@ -94,6 +94,12 @@
repo-hash: 0c229866
repo-prefix: my-reference-0c229866
source: some-dir/my-source-repo
roles:
pull:
noop:
same:
source: reference
target: same
Call with existing data
-----------------
......@@ -147,6 +153,12 @@
repo-hash: 0c229866
repo-prefix: my-reference-0c229866
source: some-dir/my-source-repo
roles:
pull:
noop:
same:
source: reference
target: same
$ tar tf my-reference-*-reference.tar | sort
my-reference-0c229866-reference/
my-reference-0c229866-reference/.hg/
......@@ -262,6 +274,12 @@
repo-hash: 0c229866
repo-prefix: my-reference-0c229866
source: some-dir/my-source-repo
roles:
pull:
noop:
same:
source: reference
target: same
$ cat << EOF > editor.sh
> #!/bin/bash
> sed -i 's,some-dir/my-source-repo,some-dir/my-other-source-repo,' \$1
......@@ -302,6 +320,12 @@
repo-hash: 0c229866
repo-prefix: my-reference-0c229866
source: some-dir/my-other-source-repo
roles:
pull:
noop:
same:
source: reference
target: same
$ cd ..
Call from scratch with explicit optimization
......@@ -359,6 +383,12 @@
repo-hash: 0c229866
repo-prefix: my-reference-0c229866
source: some-dir/my-source-repo
roles:
pull:
noop:
same:
source: reference
target: same
Call from scratch with given hgrc file
--------------------------------------
......@@ -429,3 +459,9 @@
repo-hash: 8e2c7069
repo-prefix: my-reference-8e2c7069
source: some-dir/my-source-repo
roles:
pull:
noop:
same:
source: reference
target: same
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