dirstate: flush _lastnormal when we see newer filesystem times
authorMatt Mackall <mpm@selenic.com>
Wed, 23 Mar 2011 09:34:22 -0500
changeset 13735 ce341da8537c
parent 13734 16118b4859a1
child 13736 f3c4421e121c
dirstate: flush _lastnormal when we see newer filesystem times
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Wed Mar 23 09:43:34 2011 +0100
+++ b/mercurial/dirstate.py	Wed Mar 23 09:34:22 2011 -0500
@@ -50,6 +50,7 @@
         self._dirty = False
         self._dirtypl = False
         self._lastnormal = set()        # files believed to be normal
+        self._lastnormaltime = None
         self._ui = ui
 
     @propertycache
@@ -290,6 +291,9 @@
         # process modifies it without changing its size before the clock
         # ticks over to the next second, then it won't be clean anymore.
         # So make sure that status() will look harder at it.
+        if self._lastnormaltime < s.st_mtime:
+            self._lastnormaltime = s.st_mtime
+            self._lastnormal = set()
         self._lastnormal.add(f)
 
     def normallookup(self, f):