Mercurial > hg-stable
changeset 17731:c85dbae29684
store: restore getsize method
This method was created for subclassing.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 08 Oct 2012 16:46:11 -0500 |
parents | 6c6987761e42 |
children | 93d97a212559 |
files | mercurial/store.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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: