D7333: index: use `index.has_node` in `obsutil.exclusivemarkers`
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Fri Nov 8 16:25:07 UTC 2019
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/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
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list