changeset 4606:2651099c5018

dirstate: make reload lazy
author Matt Mackall <mpm@selenic.com>
date Mon, 18 Jun 2007 13:24:33 -0500
parents 9da7a4da650f
children 49dcac6ede26
files mercurial/dirstate.py
diffstat 1 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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()