mercurial/store.py
changeset 17154 d592759aabc7
parent 17054 125ff5654b72
child 17249 7d4747c711a9
--- a/mercurial/store.py	Wed Jun 27 22:03:27 2012 +0900
+++ b/mercurial/store.py	Mon Jun 25 15:14:06 2012 -0700
@@ -391,15 +391,16 @@
     def join(self, f):
         return self.path + '/' + self.encode(f)
 
+    def getsize(self, path):
+        return os.stat(self.path + '/' + path).st_size
+
     def datafiles(self):
         rewrite = False
         existing = []
-        spath = self.path
         for f in self.fncache:
             ef = self.encode(f)
             try:
-                st = os.stat(spath + '/' + ef)
-                yield f, ef, st.st_size
+                yield f, ef, self.getsize(ef)
                 existing.append(f)
             except OSError:
                 # nonexistent entry