Patchwork D7333: index: use `index.has_node` in `obsutil.exclusivemarkers`

login
register
mail settings
Submitter phabricator
Date Nov. 9, 2019, 8:40 a.m.
Message ID <e553f984b97a1ba6273cdecf523b4742@localhost.localdomain>
Download mbox | patch
Permalink /patch/43054/
State Not Applicable
Headers show

Comments

phabricator - Nov. 9, 2019, 8:40 a.m.
Closed by commit rHGe88d07b34537: index: use `index.has_node` in `obsutil.exclusivemarkers` (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7333?vs=17756&id=17871

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

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

AFFECTED FILES
  mercurial/obsutil.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py
--- a/mercurial/obsutil.py
+++ b/mercurial/obsutil.py
@@ -249,7 +249,7 @@ 
     unfi = repo.unfiltered()
 
     # shortcut to various useful item
-    nm = unfi.changelog.nodemap
+    has_node = unfi.changelog.index.has_node
     precursorsmarkers = unfi.obsstore.predecessors
     successormarkers = unfi.obsstore.successors
     childrenmarkers = unfi.obsstore.children
@@ -297,7 +297,7 @@ 
                 continue
 
             # is this a locally known node ?
-            known = prec in nm
+            known = has_node(prec)
             # if locally-known and not in the <nodes> set the traversal
             # stop here.
             if known and prec not in nodes: