D1347: dirstate: make map implementation overridable

mbthomas (Mark Thomas) phabricator at mercurial-scm.org
Fri Nov 17 17:29:16 EST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG51f155abc689: dirstate: make map implementation overridable (authored by mbthomas, committed by ).

REPOSITORY
  rHG Mercurial

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

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

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



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


More information about the Mercurial-devel mailing list