Patchwork D7327: index: use `index.get_rev` in `localrepo.known`

login
register
mail settings
Submitter phabricator
Date Nov. 9, 2019, 1:14 p.m.
Message ID <6aa7de65ecebb63a4e2f7453e717ac7b@localhost.localdomain>
Download mbox | patch
Permalink /patch/43070/
State Not Applicable
Headers show

Comments

phabricator - Nov. 9, 2019, 1:14 p.m.
marmoute updated this revision to Diff 17886.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7327?vs=17840&id=17886

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7327/new/

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

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS




To: marmoute, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

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