diff -r 9db77d46de79 -r 24ee91ba9aa8 mercurial/lock.py --- a/mercurial/lock.py Mon Jan 06 14:15:40 2025 -0500 +++ b/mercurial/lock.py Sun Jan 05 21:03:17 2025 -0500 @@ -287,7 +287,7 @@ with self._maybedelayedinterrupt(): self.vfs.makelock(lockname, self.f) self.held = 1 - except (OSError, IOError) as why: + except OSError as why: if why.errno == errno.EEXIST: locker = self._readlock() if locker is None: