mercurial/store.py
changeset 50473 2b2284cf949b
parent 50472 7d4d2a160cf5
child 50474 4cbdfab6f812
equal deleted inserted replaced
50472:7d4d2a160cf5 50473:2b2284cf949b
   458     """An entry in the store
   458     """An entry in the store
   459 
   459 
   460     This is returned by `store.walk` and represent some data in the store."""
   460     This is returned by `store.walk` and represent some data in the store."""
   461 
   461 
   462     unencoded_path = attr.ib()
   462     unencoded_path = attr.ib()
   463     is_volatile = attr.ib(default=False)
   463     _is_volatile = attr.ib(default=False)
   464     _file_size = attr.ib(default=None)
   464     _file_size = attr.ib(default=None)
   465 
   465 
   466     def __init__(
   466     def __init__(
   467         self,
   467         self,
   468         unencoded_path,
   468         unencoded_path,
   469         is_volatile=False,
   469         is_volatile=False,
   470         file_size=None,
   470         file_size=None,
   471     ):
   471     ):
   472         self.unencoded_path = unencoded_path
   472         self.unencoded_path = unencoded_path
   473         self.is_volatile = is_volatile
   473         self._is_volatile = is_volatile
   474         self._file_size = file_size
   474         self._file_size = file_size
   475 
   475 
   476     def files(self):
   476     def files(self):
   477         return [
   477         return [
   478             StoreFile(
   478             StoreFile(
   479                 unencoded_path=self.unencoded_path,
   479                 unencoded_path=self.unencoded_path,
   480                 file_size=self._file_size,
   480                 file_size=self._file_size,
   481                 is_volatile=self.is_volatile,
   481                 is_volatile=self._is_volatile,
   482             )
   482             )
   483         ]
   483         ]
   484 
   484 
   485 
   485 
   486 @attr.s(slots=True, init=False)
   486 @attr.s(slots=True, init=False)