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

login
register
mail settings
Submitter phabricator
Date Nov. 8, 2019, 1:34 p.m.
Message ID <differential-rev-PHID-DREV-mibimh65nm2pxepytp6i-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42929/
State Superseded
Headers show

Comments

phabricator - Nov. 8, 2019, 1:34 p.m.
marmoute created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
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