Mercurial > hg-stable
changeset 14207:c1cca38818b9
changelog: fixes leaked file handle
author | Zachary Gramana <zgramana@pottsconsultinggroup.com> |
---|---|
date | Thu, 05 May 2011 11:33:02 -0400 |
parents | 2bf60f158ecb |
children | d62d597b8974 |
files | mercurial/changelog.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/changelog.py Thu May 05 23:21:37 2011 +0800 +++ b/mercurial/changelog.py Thu May 05 11:33:02 2011 -0400 @@ -118,7 +118,9 @@ self.opener = self._realopener # move redirected index data back into place if self._divert: - n = self.opener(self.indexfile + ".a").name + nfile = self.opener(self.indexfile + ".a") + n = nfile.name + nfile.close() util.rename(n, n[:-2]) elif self._delaybuf: fp = self.opener(self.indexfile, 'a')