[PATCH] changelog: fixes leaked file handle
Matt Mackall
mpm at selenic.com
Fri May 6 00:45:00 CDT 2011
On Thu, 2011-05-05 at 11:49 -0400, Zachary Gramana wrote:
> # HG changeset patch
> # User Zachary Gramana <zgramana at pottsconsultinggroup.com>
> # Date 1304609582 14400
> # Node ID bedad898a28a3e6a25afff650a68e47c347ec1db
> # Parent 333def42e785fddda47dd097c0648abb105e399a
> changelog: fixes leaked file handle
Queued, though there was still interesting whitespace damage.
> diff -r 333def42e785 -r bedad898a28a mercurial/changelog.py
> --- a/mercurial/changelog.py Wed May 04 08:21:50 2011 -0500
> +++ 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')
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list