diff -r 53e9422a9b45 -r 2e726c934fcd mercurial/obsolete.py --- a/mercurial/obsolete.py Tue May 31 21:16:17 2022 +0200 +++ b/mercurial/obsolete.py Tue May 31 22:50:01 2022 +0200 @@ -69,7 +69,6 @@ """ import binascii -import errno import struct from .i18n import _ @@ -582,11 +581,10 @@ if not self._cached('_all'): try: return self.svfs.stat(b'obsstore').st_size > 1 - except OSError as inst: - if inst.errno != errno.ENOENT: - raise + except FileNotFoundError: # just build an empty _all list if no obsstore exists, which # avoids further stat() syscalls + pass return bool(self._all) __bool__ = __nonzero__