D7351: index: use `index.has_node` in `histedit._finishhistedit
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Fri Nov 8 16:29:02 UTC 2019
marmoute created this revision.
Herald added a reviewer: durin42.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D7351
AFFECTED FILES
hgext/histedit.py
CHANGE DETAILS
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
To: marmoute, durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list