comparison mercurial/transaction.py @ 573:fbfbd4e506c3

transaction: nullify journal after close() -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 transaction: nullify journal after close() This keeps us from trying to cleanup in __del__. bug spotted by K Thananchayan <thananck@yahoo.com> manifest hash: 1f4c5fa43d2458cdcb6ec0f0a7066b3c3e699f33 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCxwQ6ywK+sNU5EO8RAuGhAJ9+BnKILwRCF9EKlPTz2zptiysQ/QCgsB3s VKIehiStv+ibWQQi15k4mwk= =nZD1 -----END PGP SIGNATURE-----
author mpm@selenic.com
date Sat, 02 Jul 2005 13:16:42 -0800
parents 0ceea19182a9
children df8a5a0098d4
comparison
equal deleted inserted replaced
572:cb7cd12e00f1 573:fbfbd4e506c3
50 self.entries = [] 50 self.entries = []
51 if self.after: 51 if self.after:
52 util.rename(self.journal, self.after) 52 util.rename(self.journal, self.after)
53 else: 53 else:
54 os.unlink(self.journal) 54 os.unlink(self.journal)
55 self.journal = None
55 56
56 def abort(self): 57 def abort(self):
57 if not self.entries: return 58 if not self.entries: return
58 59
59 print "transaction abort!" 60 print "transaction abort!"