# HG changeset patch # User Pierre-Yves David # Date 2019-11-08 13:16:24 # Node ID 9970412d2ce3bb454bdbb24399cccfa45ca4fed4 # Parent 7f489b9a79a1211edc70dc89599f12fe7100f39f index: use `index.has_node` in `analyzeremotephases` Differential Revision: https://phab.mercurial-scm.org/D7330 diff --git a/mercurial/phases.py b/mercurial/phases.py --- a/mercurial/phases.py +++ b/mercurial/phases.py @@ -672,7 +672,7 @@ def analyzeremotephases(repo, subset, ro repo = repo.unfiltered() # build list from dictionary draftroots = [] - nodemap = repo.changelog.nodemap # to filter unknown nodes + has_node = repo.changelog.index.has_node # to filter unknown nodes for nhex, phase in pycompat.iteritems(roots): if nhex == b'publishing': # ignore data related to publish option continue @@ -688,7 +688,7 @@ def analyzeremotephases(repo, subset, ro % nhex ) elif phase == draft: - if node in nodemap: + if has_node(node): draftroots.append(node) else: repo.ui.warn(