# HG changeset patch # User Benoit Boissinot # Date 1263246084 -3600 # Node ID 826bb566541c4ecc8809eb81c6ba76620885a047 # Parent 192c39586787280159ca1ee8694afa5d6f32052c# Parent 9f0c7be7c46cb5b074cd6a0db819b9cdff3d4433 merge crew together diff -r 192c39586787 -r 826bb566541c contrib/shrink-revlog.py diff -r 192c39586787 -r 826bb566541c mercurial/transaction.py --- a/mercurial/transaction.py Sat Jan 09 23:12:21 2010 +0100 +++ b/mercurial/transaction.py Mon Jan 11 22:41:24 2010 +0100 @@ -42,8 +42,6 @@ class transaction(object): def __init__(self, report, opener, journal, after=None, createmode=None): - self.journal = None - self.count = 1 self.report = report self.opener = opener @@ -140,14 +138,14 @@ self.count = 0 self.file.close() - if not self.entries: - if self.journal: - os.unlink(self.journal) - return + try: + if not self.entries: + if self.journal: + os.unlink(self.journal) + return - self.report(_("transaction abort!\n")) + self.report(_("transaction abort!\n")) - try: try: _playback(self.journal, self.report, self.opener, self.entries, False) self.report(_("rollback completed\n"))