##// END OF EJS Templates
revlog: add docket method to request new content files...
marmoute -
r48247:865c260d default
parent child Browse files
Show More
@@ -173,6 +173,15 b' class RevlogDocket(object):'
173 173 self._index_uuid = make_uid()
174 174 return b"%s-%s.idx" % (self._radix, self._index_uuid)
175 175
176 def new_index_file(self):
177 """switch index file to a new UID
178
179 The previous index UID is moved to the "older" list."""
180 old = (self._index_uuid, self._index_end)
181 self._older_index_uuids.insert(0, old)
182 self._index_uuid = make_uid()
183 return self.index_filepath()
184
176 185 def data_filepath(self):
177 186 """file path to the current data file associated to this docket"""
178 187 # very simplistic version at first
@@ -180,6 +189,15 b' class RevlogDocket(object):'
180 189 self._data_uuid = make_uid()
181 190 return b"%s-%s.dat" % (self._radix, self._data_uuid)
182 191
192 def new_data_file(self):
193 """switch data file to a new UID
194
195 The previous data UID is moved to the "older" list."""
196 old = (self._data_uuid, self._data_end)
197 self._older_data_uuids.insert(0, old)
198 self._data_uuid = make_uid()
199 return self.data_filepath()
200
183 201 def sidedata_filepath(self):
184 202 """file path to the current sidedata file associated to this docket"""
185 203 # very simplistic version at first
@@ -187,6 +205,15 b' class RevlogDocket(object):'
187 205 self._sidedata_uuid = make_uid()
188 206 return b"%s-%s.sda" % (self._radix, self._sidedata_uuid)
189 207
208 def new_sidedata_file(self):
209 """switch sidedata file to a new UID
210
211 The previous sidedata UID is moved to the "older" list."""
212 old = (self._sidedata_uuid, self._sidedata_end)
213 self._older_sidedata_uuids.insert(0, old)
214 self._sidedata_uuid = make_uid()
215 return self.sidedata_filepath()
216
190 217 @property
191 218 def index_end(self):
192 219 return self._index_end
General Comments 0
You need to be logged in to leave comments. Login now