changeset 12:8b64243ee17b

Delete journal on destruction even if there are no entries to replay.
author mpm@selenic.com
date Wed, 04 May 2005 09:30:56 -0800
parents 7f16aaeed62f
children eb87b7dc4236
files mercurial/transaction.py
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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):