benchmarks: restore `output` variable lost in D10884
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 22 Jun 2021 08:24:27 -0700
changeset 47458 50cd14dbd3b3
parent 47457 f8330a3fc39f
child 47459 de54d11040e7
benchmarks: restore `output` variable lost in D10884 Noticed by pyflakes (which I didn't have installed for Python 3.9 when I sent D10884). Differential Revision: https://phab.mercurial-scm.org/D10894
contrib/benchmarks/__init__.py
--- a/contrib/benchmarks/__init__.py	Mon Jun 07 11:59:27 2021 +0200
+++ b/contrib/benchmarks/__init__.py	Tue Jun 22 08:24:27 2021 -0700
@@ -76,8 +76,9 @@
         ui, 'perfext', os.path.join(basedir, 'contrib', 'perf.py')
     )
     cmd = getattr(perfext, command)
-    with ui.silent():
-        cmd(ui, repo, *args, **kwargs)
+    ui.pushbuffer()
+    cmd(ui, repo, *args, **kwargs)
+    output = ui.popbuffer()
     match = outputre.search(output)
     if not match:
         raise ValueError("Invalid output {}".format(output))