rust-dirstatemap: remove additional lookup in dirstate.matches
authorRaphaël Gomès <rgomes@octobus.net>
Wed, 16 Oct 2019 14:12:48 +0200
changeset 44357 bed8d08cfcb2
parent 44356 d2da8667125b
child 44358 d52e3826cd4b
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
mercurial/dirstate.py
--- 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()