comparison mercurial/transaction.py @ 27394:e7e1528cf200

spelling: fix typo in transaction error messages
author Matt Mackall <mpm@selenic.com>
date Sat, 17 Oct 2015 15:28:02 -0500
parents 96dd93de548c
children f7ab50c721ac
comparison
equal deleted inserted replaced
27393:96dd93de548c 27394:e7e1528cf200
408 self.file.close() 408 self.file.close()
409 self._backupsfile.close() 409 self._backupsfile.close()
410 # cleanup temporary files 410 # cleanup temporary files
411 for l, f, b, c in self._backupentries: 411 for l, f, b, c in self._backupentries:
412 if l not in self._vfsmap and c: 412 if l not in self._vfsmap and c:
413 self.report("couldn't remote %s: unknown cache location %s\n" 413 self.report("couldn't remove %s: unknown cache location %s\n"
414 % (b, l)) 414 % (b, l))
415 continue 415 continue
416 vfs = self._vfsmap[l] 416 vfs = self._vfsmap[l]
417 if not f and b and vfs.exists(b): 417 if not f and b and vfs.exists(b):
418 try: 418 try:
419 vfs.unlink(b) 419 vfs.unlink(b)
420 except (IOError, OSError, error.Abort) as inst: 420 except (IOError, OSError, error.Abort) as inst:
421 if not c: 421 if not c:
422 raise 422 raise
423 # Abort may be raise by read only opener 423 # Abort may be raise by read only opener
424 self.report("couldn't remote %s: %s\n" 424 self.report("couldn't remove %s: %s\n"
425 % (vfs.join(b), inst)) 425 % (vfs.join(b), inst))
426 self.entries = [] 426 self.entries = []
427 self._writeundo() 427 self._writeundo()
428 if self.after: 428 if self.after:
429 self.after() 429 self.after()
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 if True:
435 for l, _f, b, c in self._backupentries: 435 for l, _f, b, c in self._backupentries:
436 if l not in self._vfsmap and c: 436 if l not in self._vfsmap and c:
437 self.report("couldn't remote %s: unknown cache location" 437 self.report("couldn't remove %s: unknown cache location"
438 "%s\n" % (b, l)) 438 "%s\n" % (b, l))
439 continue 439 continue
440 vfs = self._vfsmap[l] 440 vfs = self._vfsmap[l]
441 if b and vfs.exists(b): 441 if b and vfs.exists(b):
442 try: 442 try:
443 vfs.unlink(b) 443 vfs.unlink(b)
444 except (IOError, OSError, error.Abort) as inst: 444 except (IOError, OSError, error.Abort) as inst:
445 if not c: 445 if not c:
446 raise 446 raise
447 # Abort may be raise by read only opener 447 # Abort may be raise by read only opener
448 self.report("couldn't remote %s: %s\n" 448 self.report("couldn't remove %s: %s\n"
449 % (vfs.join(b), inst)) 449 % (vfs.join(b), inst))
450 self._backupentries = [] 450 self._backupentries = []
451 self.journal = None 451 self.journal = None
452 452
453 self.releasefn(self, True) # notify success of closing transaction 453 self.releasefn(self, True) # notify success of closing transaction
475 continue 475 continue
476 if not b: 476 if not b:
477 u = '' 477 u = ''
478 else: 478 else:
479 if l not in self._vfsmap and c: 479 if l not in self._vfsmap and c:
480 self.report("couldn't remote %s: unknown cache location" 480 self.report("couldn't remove %s: unknown cache location"
481 "%s\n" % (b, l)) 481 "%s\n" % (b, l))
482 continue 482 continue
483 vfs = self._vfsmap[l] 483 vfs = self._vfsmap[l]
484 base, name = vfs.split(b) 484 base, name = vfs.split(b)
485 assert name.startswith(self.journal), name 485 assert name.startswith(self.journal), name