Show More
@@ -121,7 +121,7 b' class transaction(util.transactional):' | |||||
121 | """ |
|
121 | """ | |
122 | self._count = 1 |
|
122 | self._count = 1 | |
123 | self._usages = 1 |
|
123 | self._usages = 1 | |
124 | self.report = report |
|
124 | self._report = report | |
125 | # a vfs to the store content |
|
125 | # a vfs to the store content | |
126 | self._opener = opener |
|
126 | self._opener = opener | |
127 | # a map to access file in various {location -> vfs} |
|
127 | # a map to access file in various {location -> vfs} | |
@@ -473,8 +473,8 b' class transaction(util.transactional):' | |||||
473 | # cleanup temporary files |
|
473 | # cleanup temporary files | |
474 | for l, f, b, c in self._backupentries: |
|
474 | for l, f, b, c in self._backupentries: | |
475 | if l not in self._vfsmap and c: |
|
475 | if l not in self._vfsmap and c: | |
476 | self.report("couldn't remove %s: unknown cache location %s\n" |
|
476 | self._report("couldn't remove %s: unknown cache location %s\n" | |
477 | % (b, l)) |
|
477 | % (b, l)) | |
478 | continue |
|
478 | continue | |
479 | vfs = self._vfsmap[l] |
|
479 | vfs = self._vfsmap[l] | |
480 | if not f and b and vfs.exists(b): |
|
480 | if not f and b and vfs.exists(b): | |
@@ -484,8 +484,8 b' class transaction(util.transactional):' | |||||
484 | if not c: |
|
484 | if not c: | |
485 | raise |
|
485 | raise | |
486 | # Abort may be raise by read only opener |
|
486 | # Abort may be raise by read only opener | |
487 | self.report("couldn't remove %s: %s\n" |
|
487 | self._report("couldn't remove %s: %s\n" | |
488 | % (vfs.join(b), inst)) |
|
488 | % (vfs.join(b), inst)) | |
489 | self.entries = [] |
|
489 | self.entries = [] | |
490 | self._writeundo() |
|
490 | self._writeundo() | |
491 | if self._after: |
|
491 | if self._after: | |
@@ -497,8 +497,8 b' class transaction(util.transactional):' | |||||
497 | self._opener.unlink(self._journal) |
|
497 | self._opener.unlink(self._journal) | |
498 | for l, _f, b, c in self._backupentries: |
|
498 | for l, _f, b, c in self._backupentries: | |
499 | if l not in self._vfsmap and c: |
|
499 | if l not in self._vfsmap and c: | |
500 | self.report("couldn't remove %s: unknown cache location" |
|
500 | self._report("couldn't remove %s: unknown cache location" | |
501 | "%s\n" % (b, l)) |
|
501 | "%s\n" % (b, l)) | |
502 | continue |
|
502 | continue | |
503 | vfs = self._vfsmap[l] |
|
503 | vfs = self._vfsmap[l] | |
504 | if b and vfs.exists(b): |
|
504 | if b and vfs.exists(b): | |
@@ -508,8 +508,8 b' class transaction(util.transactional):' | |||||
508 | if not c: |
|
508 | if not c: | |
509 | raise |
|
509 | raise | |
510 | # Abort may be raise by read only opener |
|
510 | # Abort may be raise by read only opener | |
511 | self.report("couldn't remove %s: %s\n" |
|
511 | self._report("couldn't remove %s: %s\n" | |
512 | % (vfs.join(b), inst)) |
|
512 | % (vfs.join(b), inst)) | |
513 | self._backupentries = [] |
|
513 | self._backupentries = [] | |
514 | self._journal = None |
|
514 | self._journal = None | |
515 |
|
515 | |||
@@ -544,8 +544,8 b' class transaction(util.transactional):' | |||||
544 | u = '' |
|
544 | u = '' | |
545 | else: |
|
545 | else: | |
546 | if l not in self._vfsmap and c: |
|
546 | if l not in self._vfsmap and c: | |
547 | self.report("couldn't remove %s: unknown cache location" |
|
547 | self._report("couldn't remove %s: unknown cache location" | |
548 | "%s\n" % (b, l)) |
|
548 | "%s\n" % (b, l)) | |
549 | continue |
|
549 | continue | |
550 | vfs = self._vfsmap[l] |
|
550 | vfs = self._vfsmap[l] | |
551 | base, name = vfs.split(b) |
|
551 | base, name = vfs.split(b) | |
@@ -571,19 +571,19 b' class transaction(util.transactional):' | |||||
571 | self._opener.unlink(self._journal) |
|
571 | self._opener.unlink(self._journal) | |
572 | return |
|
572 | return | |
573 |
|
573 | |||
574 | self.report(_("transaction abort!\n")) |
|
574 | self._report(_("transaction abort!\n")) | |
575 |
|
575 | |||
576 | try: |
|
576 | try: | |
577 | for cat in sorted(self._abortcallback): |
|
577 | for cat in sorted(self._abortcallback): | |
578 | self._abortcallback[cat](self) |
|
578 | self._abortcallback[cat](self) | |
579 | # Prevent double usage and help clear cycles. |
|
579 | # Prevent double usage and help clear cycles. | |
580 | self._abortcallback = None |
|
580 | self._abortcallback = None | |
581 | _playback(self._journal, self.report, self._opener, |
|
581 | _playback(self._journal, self._report, self._opener, | |
582 | self._vfsmap, self.entries, self._backupentries, |
|
582 | self._vfsmap, self.entries, self._backupentries, | |
583 | False, checkambigfiles=self._checkambigfiles) |
|
583 | False, checkambigfiles=self._checkambigfiles) | |
584 | self.report(_("rollback completed\n")) |
|
584 | self._report(_("rollback completed\n")) | |
585 | except BaseException: |
|
585 | except BaseException: | |
586 | self.report(_("rollback failed - please run hg recover\n")) |
|
586 | self._report(_("rollback failed - please run hg recover\n")) | |
587 | finally: |
|
587 | finally: | |
588 | self._journal = None |
|
588 | self._journal = None | |
589 | self._releasefn(self, False) # notify failure of transaction |
|
589 | self._releasefn(self, False) # notify failure of transaction |
@@ -45,7 +45,7 b' def debugbruterebase(ui, repo, source, d' | |||||
45 | subset = [rev for j, rev in enumerate(srevs) if i & (1 << j) != 0] |
|
45 | subset = [rev for j, rev in enumerate(srevs) if i & (1 << j) != 0] | |
46 | spec = revsetlang.formatspec(b'%ld', subset) |
|
46 | spec = revsetlang.formatspec(b'%ld', subset) | |
47 | tr = repo.transaction(b'rebase') |
|
47 | tr = repo.transaction(b'rebase') | |
48 | tr.report = lambda x: 0 # hide "transaction abort" |
|
48 | tr._report = lambda x: 0 # hide "transaction abort" | |
49 |
|
49 | |||
50 | ui.pushbuffer() |
|
50 | ui.pushbuffer() | |
51 | try: |
|
51 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now