##// END OF EJS Templates
revlogv2: simplify and clarify the processing of each entry...
marmoute -
r48106:3f218413 default draft
parent child Browse files
Show More
@@ -238,18 +238,29 b' def parse_docket(revlog, data, use_pendi'
238 """given some docket data return a docket object for the given revlog"""
238 """given some docket data return a docket object for the given revlog"""
239 header = S_HEADER.unpack(data[: S_HEADER.size])
239 header = S_HEADER.unpack(data[: S_HEADER.size])
240 offset = S_HEADER.size
240 offset = S_HEADER.size
241 version_header = header[0]
241
242 index_uuid_size = header[1]
242 iheader = iter(header)
243
244 version_header = next(iheader)
245
246 index_uuid_size = next(iheader)
243 index_uuid = data[offset : offset + index_uuid_size]
247 index_uuid = data[offset : offset + index_uuid_size]
244 offset += index_uuid_size
248 offset += index_uuid_size
245 data_uuid_size = header[2]
249
250 data_uuid_size = next(iheader)
246 data_uuid = data[offset : offset + data_uuid_size]
251 data_uuid = data[offset : offset + data_uuid_size]
247 offset += data_uuid_size
252 offset += data_uuid_size
248 index_size = header[3]
253
249 pending_index_size = header[4]
254 index_size = next(iheader)
250 data_size = header[5]
255
251 pending_data_size = header[6]
256 pending_index_size = next(iheader)
252 default_compression_header = header[7]
257
258 data_size = next(iheader)
259
260 pending_data_size = next(iheader)
261
262 default_compression_header = next(iheader)
263
253 docket = RevlogDocket(
264 docket = RevlogDocket(
254 revlog,
265 revlog,
255 use_pending=use_pending,
266 use_pending=use_pending,
General Comments 0
You need to be logged in to leave comments. Login now