changeset 43603:ded3d545b6f0

index: use `index.get_rev` in `localrepo.known` Differential Revision: https://phab.mercurial-scm.org/D7327
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 09 Nov 2019 13:23:51 +0100
parents b56de57c45ce
children 505a2bc53759
files mercurial/localrepo.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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