Patchwork D7117: rust-dirstatemap: remove additional lookups in dirstatemap

login
register
mail settings
Submitter phabricator
Date Oct. 18, 2019, 11:08 a.m.
Message ID <562dfcb37868636267ed03a85077d1a1@localhost.localdomain>
Download mbox | patch
Permalink /patch/42471/
State Not Applicable
Headers show

Comments

phabricator - Oct. 18, 2019, 11:08 a.m.
Closed by commit rHG5d4046594d6f: rust-dirstatemap: remove additional lookups in dirstatemap (authored by Alphare).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7117?vs=17199&id=17337

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7117/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7117

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS




To: Alphare, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- 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))