Mercurial > hg
comparison mercurial/transaction.py @ 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 | e7e1528cf200 |
children | b2145c195f24 |
comparison
equal
deleted
inserted
replaced
27661:abc79f44f548 | 27662:f7ab50c721ac |
---|---|
429 self.after() | 429 self.after() |
430 if self.opener.isfile(self._backupjournal): | 430 if self.opener.isfile(self._backupjournal): |
431 self.opener.unlink(self._backupjournal) | 431 self.opener.unlink(self._backupjournal) |
432 if self.opener.isfile(self.journal): | 432 if self.opener.isfile(self.journal): |
433 self.opener.unlink(self.journal) | 433 self.opener.unlink(self.journal) |
434 if True: | 434 for l, _f, b, c in self._backupentries: |
435 for l, _f, b, c in self._backupentries: | 435 if l not in self._vfsmap and c: |
436 if l not in self._vfsmap and c: | 436 self.report("couldn't remove %s: unknown cache location" |
437 self.report("couldn't remove %s: unknown cache location" | 437 "%s\n" % (b, l)) |
438 "%s\n" % (b, l)) | 438 continue |
439 continue | 439 vfs = self._vfsmap[l] |
440 vfs = self._vfsmap[l] | 440 if b and vfs.exists(b): |
441 if b and vfs.exists(b): | 441 try: |
442 try: | 442 vfs.unlink(b) |
443 vfs.unlink(b) | 443 except (IOError, OSError, error.Abort) as inst: |
444 except (IOError, OSError, error.Abort) as inst: | 444 if not c: |
445 if not c: | 445 raise |
446 raise | 446 # Abort may be raise by read only opener |
447 # Abort may be raise by read only opener | 447 self.report("couldn't remove %s: %s\n" |
448 self.report("couldn't remove %s: %s\n" | 448 % (vfs.join(b), inst)) |
449 % (vfs.join(b), inst)) | |
450 self._backupentries = [] | 449 self._backupentries = [] |
451 self.journal = None | 450 self.journal = None |
452 | 451 |
453 self.releasefn(self, True) # notify success of closing transaction | 452 self.releasefn(self, True) # notify success of closing transaction |
454 | 453 |