dirstate: cleanup the `_map` property cache
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 21 Feb 2023 15:35:31 +0100
changeset 50178 3c6546b149ed
parent 50177 2f60cd6442fd
child 50179 9e1debbb477e
dirstate: cleanup the `_map` property cache The removed code was duplicating the effect of `@propertycache`. This is a gratuitous cleanup.
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Wed Feb 22 01:08:25 2023 +0100
+++ b/mercurial/dirstate.py	Tue Feb 21 15:35:31 2023 +0100
@@ -316,14 +316,13 @@
     @propertycache
     def _map(self):
         """Return the dirstate contents (see documentation for dirstatemap)."""
-        self._map = self._mapcls(
+        return self._mapcls(
             self._ui,
             self._opener,
             self._root,
             self._nodeconstants,
             self._use_dirstate_v2,
         )
-        return self._map
 
     @property
     def _sparsematcher(self):