diff -r 9db77d46de79 -r 24ee91ba9aa8 mercurial/streamclone.py --- a/mercurial/streamclone.py Mon Jan 06 14:15:40 2025 -0500 +++ b/mercurial/streamclone.py Sun Jan 05 21:03:17 2025 -0500 @@ -678,7 +678,7 @@ self._flush_some_on_disk() try: return self._keep_one(src) - except IOError as err: + except OSError as err: if err.errno not in (errno.ENOENT, errno.EPERM): raise return None