diff -r 9db77d46de79 -r 24ee91ba9aa8 mercurial/branching/rev_cache.py --- a/mercurial/branching/rev_cache.py Mon Jan 06 14:15:40 2025 -0500 +++ b/mercurial/branching/rev_cache.py Sun Jan 05 21:03:17 2025 -0500 @@ -157,7 +157,7 @@ try: try: bndata = repo.cachevfs.read(_rbcnames) - except (IOError, OSError): + except OSError: # If we don't have "v2" data, we might have "v1" data worth # using. # @@ -170,7 +170,7 @@ self._names = [ encoding.tolocal(bn) for bn in bndata.split(b'\0') ] - except (IOError, OSError): + except OSError: if readonly: # don't try to use cache - fall back to the slow path self.branchinfo = self._branchinfo @@ -205,7 +205,7 @@ with repo.cachevfs(_rbc_legacy_revs) as fp: data = fp.read() self._rbcrevs = rbcrevs(data) - except (IOError, OSError) as inst: + except OSError as inst: repo.ui.debug( b"couldn't read revision branch cache: %s\n" % stringutil.forcebytestr(inst) @@ -352,7 +352,7 @@ wlock = repo.wlock(wait=False) self._writerevs(repo, start) - except (IOError, OSError, error.Abort, error.LockError) as inst: + except (OSError, error.Abort, error.LockError) as inst: repo.ui.debug( b"couldn't write revision branch cache%s: %s\n" % (step, stringutil.forcebytestr(inst))