Patchwork D1347: dirstate: make map implementation overridable

login
register
mail settings
Submitter phabricator
Date Nov. 15, 2017, 9:08 a.m.
Message ID <c26f883a18681a373c61eb1fbe0b237b@localhost.localdomain>
Download mbox | patch
Permalink /patch/25573/
State Not Applicable
Headers show

Comments

phabricator - Nov. 15, 2017, 9:08 a.m.
mbthomas updated this revision to Diff 3521.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1347?vs=3443&id=3521

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS




To: mbthomas, #hg-reviewers, durin42
Cc: durin42, mbolin, mercurial-devel

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -80,6 +80,7 @@ 
         self._plchangecallbacks = {}
         self._origpl = None
         self._updatedfiles = set()
+        self._mapcls = dirstatemap
 
     @contextlib.contextmanager
     def parentchange(self):
@@ -128,7 +129,7 @@ 
     @propertycache
     def _map(self):
         """Return the dirstate contents (see documentation for dirstatemap)."""
-        self._map = dirstatemap(self._ui, self._opener, self._root)
+        self._map = self._mapcls(self._ui, self._opener, self._root)
         return self._map
 
     @property