rust-dirstatemap: remove additional lookups in dirstatemap
We're copying this shortcut from the Python implementation, pretty standard
for this codebase.
Differential Revision: https://phab.mercurial-scm.org/D7117
--- a/mercurial/dirstate.py Thu Oct 17 21:37:21 2019 +0200
+++ b/mercurial/dirstate.py Wed Oct 16 10:14:26 2019 +0200
@@ -1784,6 +1784,10 @@
if parents and not self._dirtyparents:
self.setparents(*parents)
+ self.__contains__ = self._rustmap.__contains__
+ self.__getitem__ = self._rustmap.__getitem__
+ self.get = self._rustmap.get
+
def write(self, st, now):
parents = self.parents()
st.write(self._rustmap.write(parents[0], parents[1], now))