contrib/perf.py
changeset 51556 f1512dbfee9f
parent 51546 f376c4d5c4b6
child 51560 8e8776a28683
equal deleted inserted replaced
51555:15e680a44502 51556:f1512dbfee9f
  2200                 run_variables[1] = None
  2200                 run_variables[1] = None
  2201 
  2201 
  2202     def runone():
  2202     def runone():
  2203         bundle = run_variables[0]
  2203         bundle = run_variables[0]
  2204         tmp_dir = run_variables[1]
  2204         tmp_dir = run_variables[1]
       
  2205 
       
  2206         # we actually wants to copy all config to ensure the repo config is
       
  2207         # taken in account during the benchmark
       
  2208         new_ui = repo.ui.__class__(repo.ui)
  2205         # only pass ui when no srcrepo
  2209         # only pass ui when no srcrepo
  2206         localrepo.createrepository(
  2210         localrepo.createrepository(
  2207             repo.ui, tmp_dir, requirements=repo.requirements
  2211             new_ui, tmp_dir, requirements=repo.requirements
  2208         )
  2212         )
  2209         target = hg.repository(repo.ui, tmp_dir)
  2213         target = hg.repository(new_ui, tmp_dir)
  2210         gen = exchange.readbundle(target.ui, bundle, bundle.name)
  2214         gen = exchange.readbundle(target.ui, bundle, bundle.name)
  2211         # stream v1
  2215         # stream v1
  2212         if util.safehasattr(gen, 'apply'):
  2216         if util.safehasattr(gen, 'apply'):
  2213             gen.apply(target)
  2217             gen.apply(target)
  2214         else:
  2218         else: