contrib/perf.py
changeset 41436 ab6d1f82be32
parent 41434 48394923fbdc
child 41437 d65ba1ff4559
--- a/contrib/perf.py	Fri Jan 25 18:22:02 2019 -0500
+++ b/contrib/perf.py	Fri Jan 25 14:53:19 2019 -0500
@@ -539,10 +539,11 @@
     opts = _byteskwargs(opts)
     timer, fm = gettimer(ui, opts)
     cl = repo.changelog
+    def s():
+        clearcaches(cl)
     def d():
         len(cl.headrevs())
-        clearcaches(cl)
-    timer(d)
+    timer(d, setup=s)
     fm.end()
 
 @command(b'perftags', formatteropts+