# HG changeset patch # User Raphaël Gomès # Date 1571227968 -7200 # Node ID bed8d08cfcb2e61bf02838f5bae7d1cf0dcb1df7 # Parent d2da8667125b97bbb47c0f116271e3d672c2f426 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 diff -r d2da8667125b -r bed8d08cfcb2 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()