Patchwork D9163: errors: move UnknownCommand and AmbiguousCommand near CommandError

login
register
mail settings
Submitter phabricator
Date Oct. 7, 2020, 6:10 a.m.
Message ID <differential-rev-PHID-DREV-i7vv33mknqctqj67cpjt-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47392/
State Superseded
Headers show

Comments

phabricator - Oct. 7, 2020, 6:10 a.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  They seem closely related.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9163

AFFECTED FILES
  mercurial/error.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/error.py b/mercurial/error.py
--- a/mercurial/error.py
+++ b/mercurial/error.py
@@ -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."""