# HG changeset patch # User Pierre-Yves David # Date 2019-11-08 14:09:09 # Node ID e8cd502f0afecc2442b9ea4683f890a562231959 # Parent ac6414f2d877365f78bb86e79220dac5b8b4af43 index: use `index.has_node` in `histedit.cleanupnode` Differential Revision: https://phab.mercurial-scm.org/D7352 diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -2565,8 +2565,8 @@ def cleanupnode(ui, repo, nodes, nobacku repo = repo.unfiltered() # Find all nodes that need to be stripped # (we use %lr instead of %ln to silently ignore unknown items) - nm = repo.changelog.nodemap - nodes = sorted(n for n in nodes if n in nm) + has_node = repo.changelog.index.has_node + nodes = sorted(n for n in nodes if has_node(n)) roots = [c.node() for c in repo.set(b"roots(%ln)", nodes)] if roots: backup = not nobackup