Delete journal on destruction even if there are no entries to replay.
authormpm@selenic.com
Wed, 04 May 2005 09:30:56 -0800
changeset 12 8b64243ee17b
parent 11 7f16aaeed62f
child 13 eb87b7dc4236
Delete journal on destruction even if there are no entries to replay.
mercurial/transaction.py
--- a/mercurial/transaction.py	Tue May 03 23:39:04 2005 -0800
+++ b/mercurial/transaction.py	Wed May 04 09:30:56 2005 -0800
@@ -26,6 +26,7 @@
 
     def __del__(self):
         if self.entries: self.abort()
+        self.close()
 
     def add(self, file, offset):
         self.entries.append((file, offset))
@@ -48,11 +49,6 @@
 
         self.entries = []
 
-        try:
-            os.unlink(self.journal)
-            self.file.close()
-        except: pass
-
         print "rollback completed"
         
     def recover(self):