errors: move UnknownCommand and AmbiguousCommand near CommandError
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 06 Oct 2020 21:52:27 -0700
changeset 45677 bdd2cdf9e248
parent 45676 f95b23283760
child 45678 bd2df58366b1
errors: move UnknownCommand and AmbiguousCommand near CommandError They seem closely related. Differential Revision: https://phab.mercurial-scm.org/D9163
mercurial/error.py
--- a/mercurial/error.py	Wed Oct 07 00:45:41 2020 +0800
+++ b/mercurial/error.py	Tue Oct 06 21:52:27 2020 -0700
@@ -103,6 +103,18 @@
     __bytes__ = _tobytes
 
 
+class UnknownCommand(Exception):
+    """Exception raised if command is not in the command table."""
+
+    __bytes__ = _tobytes
+
+
+class AmbiguousCommand(Exception):
+    """Exception raised if command shortcut matches more than one command."""
+
+    __bytes__ = _tobytes
+
+
 class InterventionRequired(Hint, Exception):
     """Exception raised when a command requires human intervention."""
 
@@ -290,18 +302,6 @@
     __bytes__ = _tobytes
 
 
-class UnknownCommand(Exception):
-    """Exception raised if command is not in the command table."""
-
-    __bytes__ = _tobytes
-
-
-class AmbiguousCommand(Exception):
-    """Exception raised if command shortcut matches more than one command."""
-
-    __bytes__ = _tobytes
-
-
 # derived from KeyboardInterrupt to simplify some breakout code
 class SignalInterrupt(KeyboardInterrupt):
     """Exception raised on SIGTERM and SIGHUP."""