changeset 51556:f1512dbfee9f

perf-stream-consume: use the source repository config when applying This might contains critical configuration for the benchmark, like enabling of extensions like narrow.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 27 Mar 2024 18:51:33 +0000
parents 15e680a44502
children cc44b3df9bb4
files contrib/perf.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/perf.py	Wed Mar 27 17:46:23 2024 +0000
+++ b/contrib/perf.py	Wed Mar 27 18:51:33 2024 +0000
@@ -2202,11 +2202,15 @@
     def runone():
         bundle = run_variables[0]
         tmp_dir = run_variables[1]
+
+        # we actually wants to copy all config to ensure the repo config is
+        # taken in account during the benchmark
+        new_ui = repo.ui.__class__(repo.ui)
         # only pass ui when no srcrepo
         localrepo.createrepository(
-            repo.ui, tmp_dir, requirements=repo.requirements
+            new_ui, tmp_dir, requirements=repo.requirements
         )
-        target = hg.repository(repo.ui, tmp_dir)
+        target = hg.repository(new_ui, tmp_dir)
         gen = exchange.readbundle(target.ui, bundle, bundle.name)
         # stream v1
         if util.safehasattr(gen, 'apply'):