equal
deleted
inserted
replaced
74 repo = hg.repository(ui, os.path.join(reposdir, reponame)) |
74 repo = hg.repository(ui, os.path.join(reposdir, reponame)) |
75 perfext = extensions.load( |
75 perfext = extensions.load( |
76 ui, 'perfext', os.path.join(basedir, 'contrib', 'perf.py') |
76 ui, 'perfext', os.path.join(basedir, 'contrib', 'perf.py') |
77 ) |
77 ) |
78 cmd = getattr(perfext, command) |
78 cmd = getattr(perfext, command) |
79 with ui.silent(): |
79 ui.pushbuffer() |
80 cmd(ui, repo, *args, **kwargs) |
80 cmd(ui, repo, *args, **kwargs) |
|
81 output = ui.popbuffer() |
81 match = outputre.search(output) |
82 match = outputre.search(output) |
82 if not match: |
83 if not match: |
83 raise ValueError("Invalid output {}".format(output)) |
84 raise ValueError("Invalid output {}".format(output)) |
84 return float(match.group(1)) |
85 return float(match.group(1)) |
85 |
86 |