mercurial/changelog.py
changeset 14207 c1cca38818b9
parent 14004 97ed99d1f419
child 14334 85c82ebc96a3
--- 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')