Mercurial > hg
changeset 27964:ac5057d5fc37 stable
verify: recover lost freeing of memory
In df8973e1fb45 (verify: move file cross checking to its own function,
2016-01-05), "mflinkrevs = None" was moved into function, so the
reference was cleared there, but the calling function now held on to
the variable. The point of clearing it was presumably to free up
memory, so let's move the clearing to the calling function where it
makes a difference. Also change "mflinkrevs = None" to "del
mflinkrevs", since the comment about scope now surely is obsolete.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sun, 31 Jan 2016 00:31:55 -0800 |
parents | 07a5de79ec30 |
children | 2408645de650 |
files | mercurial/verify.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/verify.py Mon Feb 01 15:41:43 2016 +0000 +++ b/mercurial/verify.py Sun Jan 31 00:31:55 2016 -0800 @@ -149,6 +149,7 @@ filenodes = self._verifymanifest(mflinkrevs) self._crosscheckfiles(mflinkrevs, filelinkrevs, filenodes) + del mflinkrevs totalfiles, filerevisions = self._verifyfiles(filenodes, filelinkrevs) @@ -249,7 +250,6 @@ ui.progress(_('crosschecking'), count, total=total) self.err(c, _("changeset refers to unknown manifest %s") % short(m)) - mflinkrevs = None # del is bad here due to scope issues for f in sorted(filelinkrevs): count += 1