Show More
@@ -0,0 +1,34 b'' | |||
|
1 | # sidedata.py - Logic around store extra data alongside revlog revisions | |
|
2 | # | |
|
3 | # Copyright 2019 Pierre-Yves David <pierre-yves.david@octobus.net) | |
|
4 | # | |
|
5 | # This software may be used and distributed according to the terms of the | |
|
6 | # GNU General Public License version 2 or any later version. | |
|
7 | """core code for "sidedata" support | |
|
8 | ||
|
9 | The "sidedata" are stored alongside the revision without actually being part of | |
|
10 | its content and not affecting its hash. It's main use cases is to cache | |
|
11 | important information related to a changesets. | |
|
12 | ||
|
13 | The current implementation is experimental and subject to changes. Do not rely | |
|
14 | on it in production. | |
|
15 | ||
|
16 | Sidedata are stored in the revlog itself, withing the revision rawtext. They | |
|
17 | are inserted, removed from it using the flagprocessors mechanism. The following | |
|
18 | format is currently used:: | |
|
19 | ||
|
20 | initial header: | |
|
21 | <number of sidedata; 2 bytes> | |
|
22 | sidedata (repeated N times): | |
|
23 | <sidedata-key; 2 bytes> | |
|
24 | <sidedata-entry-length: 4 bytes> | |
|
25 | <sidedata-content-sha1-digest: 20 bytes> | |
|
26 | <sidedata-content; X bytes> | |
|
27 | normal raw text: | |
|
28 | <all bytes remaining in the rawtext> | |
|
29 | ||
|
30 | This is a simple and effective format. It should be enought to experiment with | |
|
31 | the concept. | |
|
32 | """ | |
|
33 | ||
|
34 | from __future__ import absolute_import |
General Comments 0
You need to be logged in to leave comments.
Login now