changeset 43561:45d123d84011

index: use `index.get_rev` in `revset._mapbynodefunc` We slightly update the code in the process. Differential Revision: https://phab.mercurial-scm.org/D7343
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 09 Nov 2019 13:23:53 +0100
parents 65d6770273c8
children a49b2e253035
files mercurial/revset.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Sat Nov 09 13:23:53 2019 +0100
+++ b/mercurial/revset.py	Sat Nov 09 13:23:53 2019 +0100
@@ -2406,10 +2406,10 @@
     filtering.
     """
     cl = repo.unfiltered().changelog
-    torev = cl.rev
+    torev = cl.index.get_rev
     tonode = cl.node
-    nodemap = cl.nodemap
-    result = set(torev(n) for n in f(tonode(r) for r in s) if n in nodemap)
+    result = set(torev(n) for n in f(tonode(r) for r in s))
+    result.discard(None)
     return smartset.baseset(result - repo.changelog.filteredrevs)