# HG changeset patch # User Pierre-Yves David # Date 2023-05-15 06:57:30 # Node ID 7d4d2a160cf5e39de9be975ac0db89c67cf8348d # Parent c37450a5f1dc5cf015313c0a0c06d98b4e97db39 store: only access file_size information through the file object This make sure other code only access this information through the proper API, and it prepare for store entries to be able to agregate multiple files. diff --git a/mercurial/store.py b/mercurial/store.py --- a/mercurial/store.py +++ b/mercurial/store.py @@ -461,7 +461,7 @@ class BaseStoreEntry: unencoded_path = attr.ib() is_volatile = attr.ib(default=False) - file_size = attr.ib(default=None) + _file_size = attr.ib(default=None) def __init__( self, @@ -471,13 +471,13 @@ class BaseStoreEntry: ): self.unencoded_path = unencoded_path self.is_volatile = is_volatile - self.file_size = file_size + self._file_size = file_size def files(self): return [ StoreFile( unencoded_path=self.unencoded_path, - file_size=self.file_size, + file_size=self._file_size, is_volatile=self.is_volatile, ) ]