Mercurial > hg
changeset 27662:f7ab50c721ac
transaction: remove 'if True:'
This seems to be left over from 96dd93de548c (transaction: reorder
unlinking .hg/journal and .hg/journal.backupfiles, 2015-10-16).
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 06 Jan 2016 11:12:09 -0800 |
parents | abc79f44f548 |
children | cddb5cd3d85a |
files | mercurial/transaction.py |
diffstat | 1 files changed, 15 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/transaction.py Thu Dec 31 13:31:42 2015 -0500 +++ b/mercurial/transaction.py Wed Jan 06 11:12:09 2016 -0800 @@ -431,22 +431,21 @@ self.opener.unlink(self._backupjournal) if self.opener.isfile(self.journal): self.opener.unlink(self.journal) - if True: - for l, _f, b, c in self._backupentries: - if l not in self._vfsmap and c: - self.report("couldn't remove %s: unknown cache location" - "%s\n" % (b, l)) - continue - vfs = self._vfsmap[l] - if b and vfs.exists(b): - try: - vfs.unlink(b) - except (IOError, OSError, error.Abort) as inst: - if not c: - raise - # Abort may be raise by read only opener - self.report("couldn't remove %s: %s\n" - % (vfs.join(b), inst)) + for l, _f, b, c in self._backupentries: + if l not in self._vfsmap and c: + self.report("couldn't remove %s: unknown cache location" + "%s\n" % (b, l)) + continue + vfs = self._vfsmap[l] + if b and vfs.exists(b): + try: + vfs.unlink(b) + except (IOError, OSError, error.Abort) as inst: + if not c: + raise + # Abort may be raise by read only opener + self.report("couldn't remove %s: %s\n" + % (vfs.join(b), inst)) self._backupentries = [] self.journal = None