Mercurial > hg
changeset 11753:eb7b04657dae stable
verify: reduce memory footprint when unpacking files
By never holding a reference to the unpacked string, we avoid holding two
consecutive large files in memory.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 05 Aug 2010 16:17:17 -0500 |
parents | 12998fd17fbc |
children | 6ccd130eab0e |
files | mercurial/verify.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/verify.py Thu Aug 05 16:17:17 2010 -0500 +++ b/mercurial/verify.py Thu Aug 05 16:17:17 2010 -0500 @@ -243,12 +243,12 @@ # verify contents try: - t = fl.read(n) + l = len(fl.read(n)) rp = fl.renamed(n) - if len(t) != fl.size(i): + if l != fl.size(i): if len(fl.revision(n)) != fl.size(i): err(lr, _("unpacked size is %s, %s expected") % - (len(t), fl.size(i)), f) + (l, fl.size(i)), f) except Exception, inst: exc(lr, _("unpacking %s") % short(n), inst, f)