[PATCH 1 of 2] error: make lock inheritance contract violations a subclass of RuntimeError

Siddharth Agarwal sid0 at fb.com
Fri Oct 2 20:12:37 UTC 2015


# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1443210965 25200
#      Fri Sep 25 12:56:05 2015 -0700
# Node ID c939fb3119d7da3d9044c840f397110f5bf7178c
# Parent  97dc6ab42aad232c73180dee648685c26662230b
error: make lock inheritance contract violations a subclass of RuntimeError

This is more appropriate, per Pierre-Yves David.

diff --git a/mercurial/error.py b/mercurial/error.py
--- a/mercurial/error.py
+++ b/mercurial/error.py
@@ -115,7 +115,7 @@ class LockUnavailable(LockError):
     pass
 
 # LockError is for errors while acquiring the lock -- this is unrelated
-class LockInheritanceContractViolation(AssertionError):
+class LockInheritanceContractViolation(RuntimeError):
     pass
 
 class ResponseError(Exception):


More information about the Mercurial-devel mailing list