diff --git a/hgext/git/dirstate.py b/hgext/git/dirstate.py --- a/hgext/git/dirstate.py +++ b/hgext/git/dirstate.py @@ -221,9 +221,6 @@ # TODO support copies? return {} - # # TODO what the heck is this - _filecache = set() - def pendingparentchange(self): # TODO: we need to implement the context manager bits and # correctly stage/revert index edits. diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -102,7 +102,6 @@ self._dirty = False self._lastnormaltime = 0 self._ui = ui - self._filecache = {} self._parentwriters = 0 self._filename = b'dirstate' self._pendingfilename = b'%s.pending' % self._filename @@ -396,12 +395,6 @@ try: f.write(self._branch + b'\n') f.close() - - # make sure filecache has the correct stat info for _branch after - # replacing the underlying file - ce = self._filecache[b'_branch'] - if ce: - ce.refresh() except: # re-raises f.discard() raise diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -2836,11 +2836,6 @@ explicitly read the dirstate again (i.e. restoring it to a previous known good state).""" if hasunfilteredcache(self, 'dirstate'): - for k in self.dirstate._filecache: - try: - delattr(self.dirstate, k) - except AttributeError: - pass delattr(self.unfiltered(), 'dirstate') def invalidate(self, clearfilecache=False):