# HG changeset patch # User Boris Feld # Date 1542837366 -3600 # Node ID 95f35c8734632d1c07d00d02f04c3bbb77fea20b # Parent f723014677a5afee8ba96c8d57495e1a3ce0b98c perf: pre-indent some code in `perfbranchmapupdate` This make the next patch easier to read. diff -r f723014677a5 -r 95f35c873463 contrib/perf.py --- a/contrib/perf.py Wed Nov 21 12:02:25 2018 +0000 +++ b/contrib/perf.py Wed Nov 21 22:56:06 2018 +0100 @@ -2325,17 +2325,18 @@ msg = b'benchmark of branchmap with %d revisions with %d new ones\n' ui.status(msg % (len(allbaserevs), len(newrevs))) - base = branchmap.branchcache() - base.update(repo, allbaserevs) - - def setup(): - x[0] = base.copy() + if True: + base = branchmap.branchcache() + base.update(repo, allbaserevs) - def bench(): - x[0].update(repo, newrevs) + def setup(): + x[0] = base.copy() - timer(bench, setup=setup) - fm.end() + def bench(): + x[0].update(repo, newrevs) + + timer(bench, setup=setup) + fm.end() @command(b'perfbranchmapload', [ (b'f', b'filter', b'', b'Specify repoview filter'),