Mercurial > hg
changeset 35086:8db4ca768416
dirstate: make map implementation overridable
Other implementations of dirstate will want to replace the class used for the
dirstate map. Allow this to happen by making the class an attribute of the
dirstate.
Differential Revision: https://phab.mercurial-scm.org/D1347
author | Mark Thomas <mbthomas@fb.com> |
---|---|
date | Wed, 15 Nov 2017 01:07:42 -0800 |
parents | ae7ad53d3c8d |
children | dd000a958364 |
files | mercurial/dirstate.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dirstate.py Wed Nov 15 01:07:42 2017 -0800 +++ b/mercurial/dirstate.py Wed Nov 15 01:07:42 2017 -0800 @@ -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