Patchwork [2,of,3] error: add TimeoutWarning wrapper

login
register
mail settings
Submitter timeless@mozdev.org
Date Sept. 25, 2015, 6:33 a.m.
Message ID <51d7fd39756d08699fa9.1443162806@waste.org>
Download mbox | patch
Permalink /patch/10627/
State Rejected
Headers show

Comments

timeless@mozdev.org - Sept. 25, 2015, 6:33 a.m.
# HG changeset patch
# User timeless@mozdev.org
# Date 1443162523 14400
#      Fri Sep 25 02:28:43 2015 -0400
# Node ID 51d7fd39756d08699fa9ec39e4387f4558df083a
# Parent  885601eff6483f0b485ac6f457faa2a39bc69f23
error: add TimeoutWarning wrapper

Patch

diff --git a/mercurial/error.py b/mercurial/error.py
--- a/mercurial/error.py
+++ b/mercurial/error.py
@@ -186,3 +186,9 @@ 
     operation which replaces the entire base with new content. This ensures
     the delta may be applied by clones which have not censored the base.
     """
+
+class TimeoutWarning(Warning):
+    def __init__(self, message, result, details):
+        self.result = result
+        self.details = details
+        super(TimeoutWarning, self).__init__(message)