Show More
@@ -284,6 +284,58 b' class revlog(object):' | |||
|
284 | 284 | file handle, a filename, and an expected position. It should check whether |
|
285 | 285 | the current position in the file handle is valid, and log/warn/fail (by |
|
286 | 286 | raising). |
|
287 | ||
|
288 | ||
|
289 | Internal details | |
|
290 | ---------------- | |
|
291 | ||
|
292 | A large part of the revlog logic deals with revisions' "index entries", tuple | |
|
293 | objects that contains the same "items" whatever the revlog version. | |
|
294 | Different versions will have different ways of storing these items (sometimes | |
|
295 | not having them at all), but the tuple will always be the same. New fields | |
|
296 | are usually added at the end to avoid breaking existing code that relies | |
|
297 | on the existing order. The field are defined as follows: | |
|
298 | ||
|
299 | [0] offset: | |
|
300 | The byte index of the start of revision data chunk. | |
|
301 | That value is shifted up by 16 bits. use "offset = field >> 16" to | |
|
302 | retrieve it. | |
|
303 | ||
|
304 | flags: | |
|
305 | A flag field that carries special information or changes the behavior | |
|
306 | of the revision. (see `REVIDX_*` constants for details) | |
|
307 | The flag field only occupies the first 16 bits of this field, | |
|
308 | use "flags = field & 0xFFFF" to retrieve the value. | |
|
309 | ||
|
310 | [1] compressed length: | |
|
311 | The size, in bytes, of the chunk on disk | |
|
312 | ||
|
313 | [2] uncompressed length: | |
|
314 | The size, in bytes, of the full revision once reconstructed. | |
|
315 | ||
|
316 | [3] base rev: | |
|
317 | Either the base of the revision delta chain (without general | |
|
318 | delta), or the base of the delta (stored in the data chunk) | |
|
319 | with general delta. | |
|
320 | ||
|
321 | [4] link rev: | |
|
322 | Changelog revision number of the changeset introducing this | |
|
323 | revision. | |
|
324 | ||
|
325 | [5] parent 1 rev: | |
|
326 | Revision number of the first parent | |
|
327 | ||
|
328 | [6] parent 2 rev: | |
|
329 | Revision number of the second parent | |
|
330 | ||
|
331 | [7] node id: | |
|
332 | The node id of the current revision | |
|
333 | ||
|
334 | [8] sidedata offset: | |
|
335 | The byte index of the start of the revision's side-data chunk. | |
|
336 | ||
|
337 | [9] sidedata chunk length: | |
|
338 | The size, in bytes, of the revision's side-data chunk. | |
|
287 | 339 | """ |
|
288 | 340 | |
|
289 | 341 | _flagserrorclass = error.RevlogError |
General Comments 0
You need to be logged in to leave comments.
Login now