Patchwork [1,of,5] error: add an exception to indicate lock inheritance API contract violations

login
register
mail settings
Submitter Siddharth Agarwal
Date Sept. 24, 2015, 11:29 p.m.
Message ID <ec07832637be1ee1e2cf.1443137376@dev6666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/10621/
State Accepted
Headers show

Comments

Siddharth Agarwal - Sept. 24, 2015, 11:29 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1443117196 25200
#      Thu Sep 24 10:53:16 2015 -0700
# Node ID ec07832637be1ee1e2cfc968db5e9d959b31032e
# Parent  b80b2ee71a08d00ec4008f3131bdf3c72e4ec2ba
error: add an exception to indicate lock inheritance API contract violations

Patch

diff --git a/mercurial/error.py b/mercurial/error.py
--- a/mercurial/error.py
+++ b/mercurial/error.py
@@ -114,6 +114,10 @@  class LockHeld(LockError):
 class LockUnavailable(LockError):
     pass
 
+# LockError is for errors while acquiring the lock -- this is unrelated
+class LockInheritanceContractViolation(AssertionError):
+    pass
+
 class ResponseError(Exception):
     """Raised to print an error with part of output and exit."""