Patchwork D7119: rust-dirstatemap: remove additional lookup in dirstate.matches

login
register
mail settings
Submitter phabricator
Date Oct. 16, 2019, 1:49 p.m.
Message ID <differential-rev-PHID-DREV-w4u6mjx53vi3xklqr4un-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42385/
State New
Headers show

Comments

phabricator - Oct. 16, 2019, 1:49 p.m.
Alphare created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We use the same trick as the Python implementation

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS




To: Alphare, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -1185,6 +1185,9 @@ 
         return files in the dirstate (in whatever state) filtered by match
         '''
         dmap = self._map
+        if rustmod is not None:
+            dmap = self._map._rustmap
+
         if match.always():
             return dmap.keys()
         files = match.files()