##// END OF EJS Templates
transaction: run abort callback in all cases...
marmoute -
r50889:3128018e default
parent child Browse files
Show More
@@ -670,6 +670,12 b' class transaction(util.transactional):'
670
670
671 quick = self._can_quick_abort(entries)
671 quick = self._can_quick_abort(entries)
672 try:
672 try:
673 if not quick:
674 self._report(_(b"transaction abort!\n"))
675 for cat in sorted(self._abortcallback):
676 self._abortcallback[cat](self)
677 # Prevent double usage and help clear cycles.
678 self._abortcallback = None
673 if quick:
679 if quick:
674 self._do_quick_abort(entries)
680 self._do_quick_abort(entries)
675 else:
681 else:
@@ -699,12 +705,7 b' class transaction(util.transactional):'
699
705
700 def _do_full_abort(self, entries):
706 def _do_full_abort(self, entries):
701 """(Noisily) rollback all the change introduced by the transaction"""
707 """(Noisily) rollback all the change introduced by the transaction"""
702 self._report(_(b"transaction abort!\n"))
703 try:
708 try:
704 for cat in sorted(self._abortcallback):
705 self._abortcallback[cat](self)
706 # Prevent double usage and help clear cycles.
707 self._abortcallback = None
708 _playback(
709 _playback(
709 self._journal,
710 self._journal,
710 self._report,
711 self._report,
@@ -644,6 +644,15 b' test that prepushkey can prevent incomin'
644 HG_TXNNAME=push
644 HG_TXNNAME=push
645 HG_URL=file:$TESTTMP/a
645 HG_URL=file:$TESTTMP/a
646
646
647 txnabort Python hook: bundle2,changes,source,txnid,txnname,url
648 txnabort hook: HG_BUNDLE2=1
649 HG_HOOKNAME=txnabort.1
650 HG_HOOKTYPE=txnabort
651 HG_SOURCE=push
652 HG_TXNID=TXN:$ID$
653 HG_TXNNAME=push
654 HG_URL=file:$TESTTMP/a
655
647 abort: prepushkey hook exited with status 1
656 abort: prepushkey hook exited with status 1
648 [40]
657 [40]
649 $ cd ../a
658 $ cd ../a
General Comments 0
You need to be logged in to leave comments. Login now