Mercurial > public > mercurial-scm > hg
diff mercurial/changelog.py @ 14207:c1cca38818b9
changelog: fixes leaked file handle
author | Zachary Gramana <zgramana@pottsconsultinggroup.com> |
---|---|
date | Thu, 05 May 2011 11:33:02 -0400 |
parents | 97ed99d1f419 |
children | 85c82ebc96a3 |
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')