# HG changeset patch # User Pierre-Yves David # Date 1711479340 0 # Node ID 8e2a68e10f5cafbe256b567e840f2d1fb555457a # Parent f376c4d5c4b66bb79c32fea3fd6a94c8ec356d7d stream: in v3, skip the "size" fast path if the entries as some unknown size We are about to prefetch size during the lock less in the v3 case. So we need to avoid trying to use that prefetched size when it is not available. See next changeset for the motivation. diff -r f376c4d5c4b6 -r 8e2a68e10f5c mercurial/store.py --- a/mercurial/store.py Tue Mar 26 08:43:20 2024 +0000 +++ b/mercurial/store.py Tue Mar 26 18:55:40 2024 +0000 @@ -453,6 +453,10 @@ self._file_size = 0 return self._file_size + @property + def has_size(self): + return self._file_size is not None + def get_stream(self, vfs, copies): """return data "stream" information for this file @@ -601,7 +605,8 @@ max_changeset=None, preserve_file_count=False, ): - if ( + pre_sized = all(f.has_size for f in self.files()) + if pre_sized and ( repo is None or max_changeset is None # This use revlog-v2, ignore for now