comparison mercurial/lock.py @ 37897:2efefde3af70

lock: pass sysstr to warnings module This makes test-lock.py slightly less broken, but it's still pretty far from passing. Differential Revision: https://phab.mercurial-scm.org/D3503
author Augie Fackler <augie@google.com>
date Fri, 27 Apr 2018 10:58:08 -0400
parents 575f59cdd8a1
children ead71b15efd5
comparison
equal deleted inserted replaced
37896:03a09579c854 37897:2efefde3af70
202 def __exit__(self, exc_type, exc_value, exc_tb): 202 def __exit__(self, exc_type, exc_value, exc_tb):
203 self.release() 203 self.release()
204 204
205 def __del__(self): 205 def __del__(self):
206 if self.held: 206 if self.held:
207 warnings.warn("use lock.release instead of del lock", 207 warnings.warn(r"use lock.release instead of del lock",
208 category=DeprecationWarning, 208 category=DeprecationWarning,
209 stacklevel=2) 209 stacklevel=2)
210 210
211 # ensure the lock will be removed 211 # ensure the lock will be removed
212 # even if recursive locking did occur 212 # even if recursive locking did occur