##// END OF EJS Templates
revlog: list older-but-still-around file in `files`...
marmoute -
r48248:f93a867a default
parent child Browse files
Show More
@@ -2821,10 +2821,13 b' class revlog(object):'
2821 res.append(self._datafile)
2821 res.append(self._datafile)
2822 else:
2822 else:
2823 res.append(self._docket_file)
2823 res.append(self._docket_file)
2824 res.extend(self._docket.old_index_filepaths(include_empty=False))
2824 if self._docket.data_end:
2825 if self._docket.data_end:
2825 res.append(self._datafile)
2826 res.append(self._datafile)
2827 res.extend(self._docket.old_data_filepaths(include_empty=False))
2826 if self._docket.sidedata_end:
2828 if self._docket.sidedata_end:
2827 res.append(self._sidedatafile)
2829 res.append(self._sidedatafile)
2830 res.extend(self._docket.old_sidedata_filepaths(include_empty=False))
2828 return res
2831 return res
2829
2832
2830 def emitrevisions(
2833 def emitrevisions(
@@ -182,6 +182,13 b' class RevlogDocket(object):'
182 self._index_uuid = make_uid()
182 self._index_uuid = make_uid()
183 return self.index_filepath()
183 return self.index_filepath()
184
184
185 def old_index_filepaths(self, include_empty=True):
186 """yield file path to older index files associated to this docket"""
187 # very simplistic version at first
188 for uuid, size in self._older_index_uuids:
189 if include_empty or size > 0:
190 yield b"%s-%s.idx" % (self._radix, uuid)
191
185 def data_filepath(self):
192 def data_filepath(self):
186 """file path to the current data file associated to this docket"""
193 """file path to the current data file associated to this docket"""
187 # very simplistic version at first
194 # very simplistic version at first
@@ -198,6 +205,13 b' class RevlogDocket(object):'
198 self._data_uuid = make_uid()
205 self._data_uuid = make_uid()
199 return self.data_filepath()
206 return self.data_filepath()
200
207
208 def old_data_filepaths(self, include_empty=True):
209 """yield file path to older data files associated to this docket"""
210 # very simplistic version at first
211 for uuid, size in self._older_data_uuids:
212 if include_empty or size > 0:
213 yield b"%s-%s.dat" % (self._radix, uuid)
214
201 def sidedata_filepath(self):
215 def sidedata_filepath(self):
202 """file path to the current sidedata file associated to this docket"""
216 """file path to the current sidedata file associated to this docket"""
203 # very simplistic version at first
217 # very simplistic version at first
@@ -214,6 +228,13 b' class RevlogDocket(object):'
214 self._sidedata_uuid = make_uid()
228 self._sidedata_uuid = make_uid()
215 return self.sidedata_filepath()
229 return self.sidedata_filepath()
216
230
231 def old_sidedata_filepaths(self, include_empty=True):
232 """yield file path to older sidedata files associated to this docket"""
233 # very simplistic version at first
234 for uuid, size in self._older_sidedata_uuids:
235 if include_empty or size > 0:
236 yield b"%s-%s.sda" % (self._radix, uuid)
237
217 @property
238 @property
218 def index_end(self):
239 def index_end(self):
219 return self._index_end
240 return self._index_end
General Comments 0
You need to be logged in to leave comments. Login now