Patchwork D7332: index: use `index.has_node` in `phases.newheads`

login
register
mail settings
Submitter phabricator
Date Nov. 8, 2019, 4:25 p.m.
Message ID <differential-rev-PHID-DREV-ah7c2fzuxxdh234nosed-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42936/
State Superseded
Headers show

Comments

phabricator - Nov. 8, 2019, 4:25 p.m.
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/D7332

AFFECTED FILES
  mercurial/phases.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-devel
phabricator - Nov. 9, 2019, 8:30 a.m.
martinvonz added a comment.


  nit: should be `get_rev`, not `has_node` in the commit message

REPOSITORY
  rHG Mercurial

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

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

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

Patch

diff --git a/mercurial/phases.py b/mercurial/phases.py
--- a/mercurial/phases.py
+++ b/mercurial/phases.py
@@ -733,7 +733,7 @@ 
 
     repo = repo.unfiltered()
     cl = repo.changelog
-    rev = cl.nodemap.get
+    rev = cl.index.get_rev
     if not roots:
         return heads
     if not heads or heads == [nullid]: