diff mercurial/crecord.py @ 26587:56b2bcea2529

error: get Abort from 'error' instead of 'util' The home of 'Abort' is 'error' not 'util' however, a lot of code seems to be confused about that and gives all the credit to 'util' instead of the hardworking 'error'. In a spirit of equity, we break the cycle of injustice and give back to 'error' the respect it deserves. And screw that 'util' poser. For great justice.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 08 Oct 2015 12:55:45 -0700
parents 4b0fc75f9403
children 1aee2ab0f902
line wrap: on
line diff
--- a/mercurial/crecord.py	Mon Oct 05 22:49:24 2015 -0700
+++ b/mercurial/crecord.py	Thu Oct 08 12:55:45 2015 -0700
@@ -22,8 +22,8 @@
 from .i18n import _
 from . import (
     encoding,
+    error,
     patch as patchmod,
-    util,
 )
 
 # This is required for ncurses to display non-ASCII characters in default user
@@ -47,7 +47,7 @@
     curses
 except NameError:
     if os.name != 'nt':  # Temporary hack to get running on Windows again
-        raise util.Abort(
+        raise error.Abort(
             _('the python curses/wcurses module is not available/installed'))
 
 _origstdout = sys.__stdout__ # used by gethw()
@@ -498,7 +498,7 @@
     f = signal.getsignal(signal.SIGTSTP)
     curses.wrapper(chunkselector.main)
     if chunkselector.initerr is not None:
-        raise util.Abort(chunkselector.initerr)
+        raise error.Abort(chunkselector.initerr)
     # ncurses does not restore signal handler for SIGTSTP
     signal.signal(signal.SIGTSTP, f)
 
@@ -1566,7 +1566,7 @@
         elif keypressed in ["H", "KEY_SLEFT"]:
             self.leftarrowshiftevent()
         elif keypressed in ["q"]:
-            raise util.Abort(_('user quit'))
+            raise error.Abort(_('user quit'))
         elif keypressed in ["c"]:
             if self.confirmcommit():
                 return True