D7330: index: use `index.has_node` in `analyzeremotephases`

2019-11-09 Thread marmoute (Pierre-Yves David)
Closed by commit rHG8b9e0d7e0699: index: use `index.has_node` in 
`analyzeremotephases` (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/D7330?vs=17753&id=17869

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

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

AFFECTED FILES
  mercurial/phases.py

CHANGE DETAILS

diff --git a/mercurial/phases.py b/mercurial/phases.py
--- a/mercurial/phases.py
+++ b/mercurial/phases.py
@@ -672,7 +672,7 @@
 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 @@
 % nhex
 )
 elif phase == draft:
-if node in nodemap:
+if has_node(node):
 draftroots.append(node)
 else:
 repo.ui.warn(



To: marmoute, #hg-reviewers, indygreg
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D7330: index: use `index.has_node` in `analyzeremotephases`

2019-11-08 Thread marmoute (Pierre-Yves David)
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/D7330

AFFECTED FILES
  mercurial/phases.py

CHANGE DETAILS

diff --git a/mercurial/phases.py b/mercurial/phases.py
--- a/mercurial/phases.py
+++ b/mercurial/phases.py
@@ -672,7 +672,7 @@
 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 @@
 % nhex
 )
 elif phase == draft:
-if node in nodemap:
+if has_node(node):
 draftroots.append(node)
 else:
 repo.ui.warn(



To: marmoute, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel