contrib/perf.py
changeset 43128 ad801d4af7cd
parent 43127 0b32206c3c86
child 43129 97f9ef777a75
--- a/contrib/perf.py	Tue Oct 08 01:49:18 2019 -0400
+++ b/contrib/perf.py	Tue Oct 08 02:12:15 2019 -0400
@@ -1170,14 +1170,16 @@
     opts = _byteskwargs(opts)
     timer, fm = gettimer(ui, opts)
     dirstate = repo.dirstate
-    b'a' in dirstate
+    dirstate._map.dirfoldmap.get(b'a')
+
+    def setup():
+        del dirstate._map.dirfoldmap
+        del dirstate._map._dirs
 
     def d():
         dirstate._map.dirfoldmap.get(b'a')
-        del dirstate._map.dirfoldmap
-        del dirstate._map._dirs
-
-    timer(d)
+
+    timer(d, setup=setup)
     fm.end()