dirstate: clear map cached properties when clearing the map
dirstatemap.clear should remove all record of the files in the map. This
includes removing caches of values derived from these.
Differential Revision: https://phab.mercurial-scm.org/D1338
--- a/mercurial/dirstate.py Wed Nov 08 09:18:18 2017 -0800
+++ b/mercurial/dirstate.py Wed Nov 08 09:23:53 2017 -0800
@@ -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()