Patchwork D7343: index: use `index.get_rev` in `revset._mapbynodefunc`

login
register
mail settings
Submitter phabricator
Date Nov. 9, 2019, 3:59 p.m.
Message ID <ed1d44e7e1b226e59031969a5404f09e@localhost.localdomain>
Download mbox | patch
Permalink /patch/43086/
State Not Applicable
Headers show

Comments

phabricator - Nov. 9, 2019, 3:59 p.m.
Closed by commit rHGaeecef1529d3: index: use `index.get_rev` in `revset._mapbynodefunc` (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/D7343?vs=17766&id=17898

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

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

AFFECTED FILES
  mercurial/revset.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -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)