Patchwork D10894: benchmarks: restore `output` variable lost in D10884

login
register
mail settings
Submitter phabricator
Date June 22, 2021, 3:32 p.m.
Message ID <differential-rev-PHID-DREV-33ny3bvieos6xcfgtb7x-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49208/
State Superseded
Headers show

Comments

phabricator - June 22, 2021, 3:32 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Noticed by pyflakes (which I didn't have installed for Python 3.9 when
  I sent D10884 <https://phab.mercurial-scm.org/D10884>).

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10894

AFFECTED FILES
  contrib/benchmarks/__init__.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/contrib/benchmarks/__init__.py b/contrib/benchmarks/__init__.py
--- a/contrib/benchmarks/__init__.py
+++ b/contrib/benchmarks/__init__.py
@@ -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))