remove appendfile data as soon as not needed.
authorVadim Gelfer <vadim.gelfer@gmail.com>
Wed, 19 Apr 2006 22:18:03 -0700
changeset 2102 c62112815801
parent 2100 2b8f887b2d1d
child 2103 caccf539c9a4
remove appendfile data as soon as not needed.
mercurial/appendfile.py
--- a/mercurial/appendfile.py	Wed Apr 19 21:39:51 2006 +0200
+++ b/mercurial/appendfile.py	Wed Apr 19 22:18:03 2006 -0700
@@ -131,14 +131,11 @@
             fp = open(tmpname, 'rb')
             s = fp.read()
             fp.close()
+            os.unlink(tmpname)
             fp = self.realopener(name, 'a')
             fp.write(s)
             fp.close()
 
-    def __del__(self):
-        for tmpname in self.tmpnames.itervalues():
-            os.unlink(tmpname)
-
 # files for changelog and manifest are in different appendopeners, so
 # not mixed up together.