scmutil.filecacheentry: make stat argument to constructor mandatory
authorSiddharth Agarwal <sid0@fb.com>
Sat, 16 Nov 2013 13:33:33 -0800
changeset 20042 9a72d3886888
parent 20041 42deff43460a
child 20043 88bd8df008f2
scmutil.filecacheentry: make stat argument to constructor mandatory There's no real upside to making stat optional -- this constructor has just two callers.
mercurial/scmutil.py
--- a/mercurial/scmutil.py	Sat Nov 16 13:57:35 2013 -0800
+++ b/mercurial/scmutil.py	Sat Nov 16 13:33:33 2013 -0800
@@ -714,7 +714,7 @@
     return requirements
 
 class filecacheentry(object):
-    def __init__(self, path, stat=True):
+    def __init__(self, path, stat):
         self.path = path
         self.cachestat = None
         self._cacheable = None
@@ -814,7 +814,7 @@
 
             # We stat -before- creating the object so our cache doesn't lie if
             # a writer modified between the time we read and stat
-            entry = filecacheentry(path)
+            entry = filecacheentry(path, True)
             entry.obj = self.func(obj)
 
             obj._filecache[self.name] = entry