mercurial/scmutil.py
changeset 18315 216230643ae2
parent 18213 c38a62af000e
child 18316 f36375576ed5
--- a/mercurial/scmutil.py	Wed Jan 09 20:36:53 2013 +0200
+++ b/mercurial/scmutil.py	Thu Jan 10 23:54:53 2013 +0200
@@ -863,15 +863,19 @@
     return requirements
 
 class filecacheentry(object):
-    def __init__(self, path):
+    def __init__(self, path, stat=True):
         self.path = path
-        self.cachestat = filecacheentry.stat(self.path)
+        self.cachestat = None
+        self._cacheable = None
 
-        if self.cachestat:
-            self._cacheable = self.cachestat.cacheable()
-        else:
-            # None means we don't know yet
-            self._cacheable = None
+        if stat:
+            self.cachestat = filecacheentry.stat(self.path)
+
+            if self.cachestat:
+                self._cacheable = self.cachestat.cacheable()
+            else:
+                # None means we don't know yet
+                self._cacheable = None
 
     def refresh(self):
         if self.cacheable():