--- a/mercurial/util.py Mon Dec 06 21:17:27 2010 -0500
+++ b/mercurial/util.py Tue Dec 07 16:03:42 2010 +0100
@@ -822,7 +822,7 @@
self._fp.close()
rename(self.temp, localpath(self.__name))
- def __del__(self):
+ def close(self):
if not self._fp:
return
if not self._fp.closed:
@@ -831,6 +831,9 @@
except: pass
self._fp.close()
+ def __del__(self):
+ self.close()
+
def makedirs(name, mode=None):
"""recursive directory creation with parent mode inheritance"""
parent = os.path.abspath(os.path.dirname(name))