dirstate: make reload lazy
authorMatt Mackall <mpm@selenic.com>
Mon, 18 Jun 2007 13:24:33 -0500
changeset 4606 2651099c5018
parent 4605 9da7a4da650f
child 4607 49dcac6ede26
dirstate: make reload lazy
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Mon Jun 18 13:24:33 2007 -0500
+++ b/mercurial/dirstate.py	Mon Jun 18 13:24:33 2007 -0500
@@ -241,14 +241,10 @@
             if err.errno != errno.ENOENT: raise
 
     def reload(self):
-        def mtime():
-            m = self.map and self.map.get('.hgignore')
-            return m and m[-1]
-
-        old_mtime = self.ignorefunc and mtime()
-        self.read()
-        if old_mtime != mtime():
-            self.ignorefunc = None
+        for a in "map copymap _branch pl dirs".split():
+            if hasattr(self, a):
+                self.__delattr__(a)
+        self.ignorefunc = None
 
     def copy(self, source, dest):
         self.markdirty()