Patchwork D1338: dirstate: clear map cached properties when clearing the map

login
register
mail settings
Submitter phabricator
Date Nov. 10, 2017, 11:03 p.m.
Message ID <53dfa27454a4bb400e93b8ddbdc4fab7@localhost.localdomain>
Download mbox | patch
Permalink /patch/25469/
State Not Applicable
Headers show

Comments

phabricator - Nov. 10, 2017, 11:03 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGecede5263adb: dirstate: clear map cached properties when clearing the map (authored by mbthomas, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1338?vs=3338&id=3412

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -1226,6 +1226,11 @@ 
         self._map.clear()
         self.copymap.clear()
         self.setparents(nullid, nullid)
+        util.clearcachedproperty(self, "dirs")
+        util.clearcachedproperty(self, "filefoldmap")
+        util.clearcachedproperty(self, "dirfoldmap")
+        util.clearcachedproperty(self, "nonnormalset")
+        util.clearcachedproperty(self, "otherparentset")
 
     def iteritems(self):
         return self._map.iteritems()