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.
--- 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