lock: handle race in trylock/testlock on Windows
authorYuya Nishihara <yuya@tcha.org>
Wed, 02 Oct 2013 21:16:40 +0900
changeset 19927 76c83107a724
parent 19926 0f99747202f9
child 19928 d1ac3790e10a
lock: handle race in trylock/testlock on Windows readlock may raise IOError if the system does not support symlink.
mercurial/lock.py
--- a/mercurial/lock.py	Mon Oct 14 17:12:59 2013 +0200
+++ b/mercurial/lock.py	Wed Oct 02 21:16:40 2013 +0900
@@ -100,7 +100,7 @@
         """
         try:
             locker = util.readlock(self.f)
-        except OSError, why:
+        except (OSError, IOError), why:
             if why.errno == errno.ENOENT:
                 return None
             raise