changeset 44357:bed8d08cfcb2

rust-dirstatemap: remove additional lookup in dirstate.matches We use the same trick as the Python implementation Differential Revision: https://phab.mercurial-scm.org/D7119
author Raphaël Gomès <rgomes@octobus.net>
date Wed, 16 Oct 2019 14:12:48 +0200
parents d2da8667125b
children d52e3826cd4b
files mercurial/dirstate.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Tue Dec 31 12:43:57 2019 +0100
+++ b/mercurial/dirstate.py	Wed Oct 16 14:12:48 2019 +0200
@@ -1262,6 +1262,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()