Patchwork D7351: index: use `index.has_node` in `histedit._finishhistedit

login
register
mail settings
Submitter phabricator
Date Nov. 9, 2019, 8:42 a.m.
Message ID <647a6c9f0b3c5455eb44f008993dc2f7@localhost.localdomain>
Download mbox | patch
Permalink /patch/43063/
State Not Applicable
Headers show

Comments

phabricator - Nov. 9, 2019, 8:42 a.m.
Closed by commit rHGac6414f2d877: index: use `index.has_node` in `histedit._finishhistedit (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/D7351?vs=17852&id=17877

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

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

AFFECTED FILES
  hgext/histedit.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -2046,11 +2046,11 @@ 
             mapping[n] = ()
 
     # remove entries about unknown nodes
-    nodemap = repo.unfiltered().changelog.nodemap
+    has_node = repo.unfiltered().changelog.index.has_node
     mapping = {
         k: v
         for k, v in mapping.items()
-        if k in nodemap and all(n in nodemap for n in v)
+        if has_node(k) and all(has_node(n) for n in v)
     }
     scmutil.cleanupnodes(repo, mapping, b'histedit')
     hf = fm.hexfunc