index: use `index.get_rev` in `localrepo.known`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sat, 09 Nov 2019 13:23:51 +0100
changeset 43555 ded3d545b6f0
parent 43554 b56de57c45ce
child 43556 505a2bc53759
index: use `index.get_rev` in `localrepo.known` Differential Revision: https://phab.mercurial-scm.org/D7327
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Sat Nov 09 13:23:51 2019 +0100
+++ b/mercurial/localrepo.py	Sat Nov 09 13:23:51 2019 +0100
@@ -1823,11 +1823,11 @@
 
     def known(self, nodes):
         cl = self.changelog
-        nm = cl.nodemap
+        get_rev = cl.index.get_rev
         filtered = cl.filteredrevs
         result = []
         for n in nodes:
-            r = nm.get(n)
+            r = get_rev(n)
             resp = not (r is None or r in filtered)
             result.append(resp)
         return result