[PATCH stable] lock: handle race in trylock/testlock on Windows
Yuya Nishihara
yuya at tcha.org
Wed Oct 2 07:59:28 CDT 2013
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1380716200 -32400
# Wed Oct 02 21:16:40 2013 +0900
# Branch stable
# Node ID 964b123c4831abac69efc5a089c446222915713f
# Parent 4d513f96a565639c0879086b68cf72a1e01e596c
lock: handle race in trylock/testlock on Windows
readlock may raise IOError if the system does not support symlink.
diff --git a/mercurial/lock.py b/mercurial/lock.py
--- a/mercurial/lock.py
+++ b/mercurial/lock.py
@@ -100,7 +100,7 @@ class lock(object):
"""
try:
locker = util.readlock(self.f)
- except OSError, why:
+ except (OSError, IOError), why:
if why.errno == errno.ENOENT:
return None
raise
More information about the Mercurial-devel
mailing list