Mercurial > hg > mercurial-source
changeset 44067:5d4046594d6f
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
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Wed, 16 Oct 2019 10:14:26 +0200 (2019-10-16) |
parents | 726bd0b612a2 |
children | 6230c70a1863 |
files | mercurial/dirstate.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -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))