verify: remove dependence on repo.changectx()
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 03 Apr 2018 08:55:16 -0700
changeset 37302 00f18dd1d3d6
parent 37301 a494cccb673e
child 37303 8823615f68a5
verify: remove dependence on repo.changectx() This was one of few remaining uses of repo.changectx() in core. Differential Revision: https://phab.mercurial-scm.org/D3034
mercurial/verify.py
--- a/mercurial/verify.py	Tue Apr 03 08:46:58 2018 -0700
+++ b/mercurial/verify.py	Tue Apr 03 08:55:16 2018 -0700
@@ -47,7 +47,7 @@
         self.havecl = len(repo.changelog) > 0
         self.havemf = len(repo.manifestlog._revlog) > 0
         self.revlogv1 = repo.changelog.version != revlog.REVLOGV0
-        self.lrugetctx = util.lrucachefunc(repo.changectx)
+        self.lrugetctx = util.lrucachefunc(repo.__getitem__)
         self.refersmf = False
         self.fncachewarned = False
         # developer config: verify.skipflags