Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revlogutils/randomaccessfile.py @ 51203:a93e52f0b6ff
changelog: disallow delayed write on inline changesets
Since this will never happens, we can make the situation invalid and to stop to
handling the associated the case.
This simplify the random access file reading too.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 07 Dec 2023 02:07:16 +0100 |
parents | d83d788590a8 |
children | eb9dea148233 |
line wrap: on
line diff
--- a/mercurial/revlogutils/randomaccessfile.py Mon Dec 11 22:27:59 2023 +0100 +++ b/mercurial/revlogutils/randomaccessfile.py Thu Dec 07 02:07:16 2023 +0100 @@ -116,8 +116,6 @@ if initial_cache: self._cached_chunk_position, self._cached_chunk = initial_cache - self._delay_buffer = None - def clear_cache(self): self._cached_chunk = b'' self._cached_chunk_position = 0 @@ -133,12 +131,7 @@ def _open(self, mode=b'r'): """Return a file object""" - if self._delay_buffer is None: - return self.opener(self.filename, mode=mode) - else: - return appender( - self.opener, self.filename, mode, self._delay_buffer - ) + return self.opener(self.filename, mode=mode) @contextlib.contextmanager def _read_handle(self):