[PATCH 2 of 3] error: rename RichIOError to PeerTransportError

Gregory Szorc gregory.szorc at gmail.com
Sun Apr 16 14:58:08 EDT 2017


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1492366357 25200
#      Sun Apr 16 11:12:37 2017 -0700
# Node ID 420b7094137e851132849b3cc8ddecf255a09bcb
# Parent  512298a07c26d7dfeb75ca4b427352e2af9d62d7
error: rename RichIOError to PeerTransportError

This is a more descriptive name. RichIOError was introduced just
hours ago, so it doesn't need to be marked as BC.

diff --git a/mercurial/error.py b/mercurial/error.py
--- a/mercurial/error.py
+++ b/mercurial/error.py
@@ -253,5 +253,5 @@ class UnsupportedBundleSpecification(Exc
 class CorruptedState(Exception):
     """error raised when a command is not able to read its state from file"""
 
-class RichIOError(Abort):
-    """An IOError that can also have a hint attached."""
+class PeerTransportError(Abort):
+    """Transport-level I/O error when communicating with a peer repo."""
diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py
--- a/mercurial/httppeer.py
+++ b/mercurial/httppeer.py
@@ -72,13 +72,13 @@ def _wraphttpresponse(resp):
                 else:
                     msg = _('HTTP request error (incomplete response)')
 
-                raise error.RichIOError(
+                raise error.PeerTransportError(
                     msg,
                     hint=_('this may be an intermittent network failure; '
                            'if the error persists, consider contacting the '
                            'network or server operator'))
             except httplib.HTTPException as e:
-                raise error.RichIOError(
+                raise error.PeerTransportError(
                     _('HTTP request error (%s)') % e,
                     hint=_('this may be an intermittent failure; '
                            'if the error persists, consider contacting the '


More information about the Mercurial-devel mailing list