changeset 50178:3c6546b149ed

dirstate: cleanup the `_map` property cache The removed code was duplicating the effect of `@propertycache`. This is a gratuitous cleanup.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 21 Feb 2023 15:35:31 +0100
parents 2f60cd6442fd
children 9e1debbb477e
files mercurial/dirstate.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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):