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

login
register
mail settings
Submitter Siddharth Agarwal
Date Oct. 2, 2015, 8:12 p.m.
Message ID <c939fb3119d7da3d9044.1443816757@dev6666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/10738/
State Accepted
Headers show

Comments

Siddharth Agarwal - Oct. 2, 2015, 8:12 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@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.

Patch

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):