store: restore getsize method
authorMatt Mackall <mpm@selenic.com>
Mon, 08 Oct 2012 16:46:11 -0500
changeset 17731 c85dbae29684
parent 17730 6c6987761e42
child 17732 93d97a212559
store: restore getsize method This method was created for subclassing.
mercurial/store.py
--- a/mercurial/store.py	Mon Oct 01 02:44:46 2012 +0200
+++ b/mercurial/store.py	Mon Oct 08 16:46:11 2012 -0500
@@ -470,14 +470,16 @@
     def join(self, f):
         return self.pathsep + self.encode(f)
 
+    def getsize(self, path):
+        return self.rawvfs.stat(path).st_size
+
     def datafiles(self):
         rewrite = False
         existing = []
-        getstat = self.rawvfs.stat
         for f in sorted(self.fncache):
             ef = self.encode(f)
             try:
-                yield f, ef, getstat(ef).st_size
+                yield f, ef, self.getsize(ef)
                 existing.append(f)
             except OSError, err:
                 if err.errno != errno.ENOENT: