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

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Sat Nov 9 03:40:35 EST 2019


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

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:



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


More information about the Mercurial-devel mailing list