errors: move UnknownCommand and AmbiguousCommand near CommandError
They seem closely related.
Differential Revision: https://phab.mercurial-scm.org/D9163
--- 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."""