[PATCH] dirstate: reset _lastnormal and _lastnormaltime

Adrian Buehlmann adrian at cadifra.com
Wed Mar 23 13:28:50 CDT 2011


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1300875749 -3600
# Node ID 1447c5a69e223518a65086db16ae5920d722bb44
# Parent  f3c4421e121c2bc8528e414b188a9404b8edc95c
dirstate: reset _lastnormal and _lastnormaltime

on write, invalidate, and clear

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -238,6 +238,8 @@ class dirstate(object):
                 "_ignore"):
             if a in self.__dict__:
                 delattr(self, a)
+        self._lastnormal = set()
+        self._lastnormaltime = None
         self._dirty = False
 
     def copy(self, source, dest):
@@ -414,6 +416,8 @@ class dirstate(object):
             delattr(self, "_dirs")
         self._copymap = {}
         self._pl = [nullid, nullid]
+        self._lastnormal = set()
+        self._lastnormaltime = None
         self._dirty = True
 
     def rebuild(self, parent, files):
@@ -461,6 +465,8 @@ class dirstate(object):
             write(f)
         st.write(cs.getvalue())
         st.rename()
+        self._lastnormal = set()
+        self._lastnormaltime = None
         self._dirty = self._dirtypl = False
 
     def _dirignore(self, f):


More information about the Mercurial-devel mailing list