--- a/mercurial/store.py Tue Mar 26 13:34:05 2024 +0000
+++ b/mercurial/store.py Tue Mar 26 13:46:44 2024 +0000
@@ -484,6 +484,8 @@
This is returned by `store.walk` and represent some data in the store."""
+ maybe_volatile = True
+
def files(self) -> List[StoreFile]:
raise NotImplementedError
@@ -509,6 +511,7 @@
is_revlog = False
+ maybe_volatile = attr.ib()
_entry_path = attr.ib()
_is_volatile = attr.ib(default=False)
_file_size = attr.ib(default=None)
@@ -525,6 +528,7 @@
self._is_volatile = is_volatile
self._file_size = file_size
self._files = None
+ self.maybe_volatile = is_volatile
def files(self) -> List[StoreFile]:
if self._files is None:
@@ -546,6 +550,7 @@
revlog_type = attr.ib(default=None)
target_id = attr.ib(default=None)
+ maybe_volatile = attr.ib(default=True)
_path_prefix = attr.ib(default=None)
_details = attr.ib(default=None)
_files = attr.ib(default=None)
@@ -562,6 +567,12 @@
self.target_id = target_id
self._path_prefix = path_prefix
assert b'.i' in details, (path_prefix, details)
+ for ext in details:
+ if ext.endswith(REVLOG_FILES_VOLATILE_EXT):
+ self.maybe_volatile = True
+ break
+ else:
+ self.maybe_volatile = False
self._details = details
self._files = None