Patchwork D3034: verify: remove dependence on repo.changectx()

login
register
mail settings
Submitter phabricator
Date April 3, 2018, 4:14 p.m.
Message ID <differential-rev-PHID-DREV-coacs6z337ujx7kekmyc-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30172/
State Superseded
Headers show

Comments

phabricator - April 3, 2018, 4:14 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This was one of few remaining uses of repo.changectx() in core.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3034

AFFECTED FILES
  mercurial/verify.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/verify.py b/mercurial/verify.py
--- a/mercurial/verify.py
+++ b/mercurial/verify.py
@@ -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