contrib/perf.py
changeset 41615 328ca3b9e545
parent 41565 bf7fb97aecf1
child 41652 6a447a3d1bd0
--- a/contrib/perf.py	Thu Feb 07 21:16:25 2019 -0800
+++ b/contrib/perf.py	Mon Jan 21 17:37:33 2019 +0000
@@ -2376,13 +2376,18 @@
             view = repo
         else:
             view = repo.filtered(filtername)
+        if util.safehasattr(view._branchcaches, '_per_filter'):
+            filtered = view._branchcaches._per_filter
+        else:
+            # older versions
+            filtered = view._branchcaches
         def d():
             if clear_revbranch:
                 repo.revbranchcache()._clear()
             if full:
                 view._branchcaches.clear()
             else:
-                view._branchcaches.pop(filtername, None)
+                filtered.pop(filtername, None)
             view.branchmap()
         return d
     # add filter in smaller subset to bigger subset