Mercurial > hg
comparison mercurial/lock.py @ 19927:76c83107a724
lock: handle race in trylock/testlock on Windows
readlock may raise IOError if the system does not support symlink.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 02 Oct 2013 21:16:40 +0900 |
parents | af9fa8d4c939 |
children | abfe6a8e619b |
comparison
equal
deleted
inserted
replaced
19926:0f99747202f9 | 19927:76c83107a724 |
---|---|
98 The lock file is only deleted when None is returned. | 98 The lock file is only deleted when None is returned. |
99 | 99 |
100 """ | 100 """ |
101 try: | 101 try: |
102 locker = util.readlock(self.f) | 102 locker = util.readlock(self.f) |
103 except OSError, why: | 103 except (OSError, IOError), why: |
104 if why.errno == errno.ENOENT: | 104 if why.errno == errno.ENOENT: |
105 return None | 105 return None |
106 raise | 106 raise |
107 try: | 107 try: |
108 host, pid = locker.split(":", 1) | 108 host, pid = locker.split(":", 1) |