Show More
@@ -2188,10 +2188,18 b' def perf_stream_clone_consume(ui, repo, ' | |||||
2188 |
|
2188 | |||
2189 | run_variables = [None, None] |
|
2189 | run_variables = [None, None] | |
2190 |
|
2190 | |||
|
2191 | # we create the new repository next to the other one for two reasons: | |||
|
2192 | # - this way we use the same file system, which are relevant for benchmark | |||
|
2193 | # - if /tmp/ is small, the operation could overfills it. | |||
|
2194 | source_repo_dir = os.path.dirname(repo.root) | |||
|
2195 | ||||
2191 | @contextlib.contextmanager |
|
2196 | @contextlib.contextmanager | |
2192 | def context(): |
|
2197 | def context(): | |
2193 | with open(filename, mode='rb') as bundle: |
|
2198 | with open(filename, mode='rb') as bundle: | |
2194 |
with tempfile.TemporaryDirectory( |
|
2199 | with tempfile.TemporaryDirectory( | |
|
2200 | prefix=b'hg-perf-stream-consume-', | |||
|
2201 | dir=source_repo_dir, | |||
|
2202 | ) as tmp_dir: | |||
2195 | tmp_dir = fsencode(tmp_dir) |
|
2203 | tmp_dir = fsencode(tmp_dir) | |
2196 | run_variables[0] = bundle |
|
2204 | run_variables[0] = bundle | |
2197 | run_variables[1] = tmp_dir |
|
2205 | run_variables[1] = tmp_dir |
General Comments 0
You need to be logged in to leave comments.
Login now