equal
deleted
inserted
replaced
9 Revlogs consist of entries which have metadata and revision data. |
9 Revlogs consist of entries which have metadata and revision data. |
10 Metadata includes the hash of the revision's content, sizes, and |
10 Metadata includes the hash of the revision's content, sizes, and |
11 links to its *parent* entries. The collective metadata is referred |
11 links to its *parent* entries. The collective metadata is referred |
12 to as the *index* and the revision data is the *data*. |
12 to as the *index* and the revision data is the *data*. |
13 |
13 |
14 Revision data is stored as a series of compressed deltas against previous |
14 Revision data is stored as a series of compressed deltas against |
15 revisions. |
15 ancestor revisions. |
16 |
16 |
17 Revlogs are written in an append-only fashion. We never need to rewrite |
17 Revlogs are written in an append-only fashion. We never need to rewrite |
18 a file to insert nor do we need to remove data. Rolling back in-progress |
18 a file to insert nor do we need to remove data. Rolling back in-progress |
19 writes can be performed by truncating files. Read locks can be avoided |
19 writes can be performed by truncating files. Read locks can be avoided |
20 using simple techniques. This means that references to other data in |
20 using simple techniques. This means that references to other data in |
32 entry. |
32 entry. |
33 |
33 |
34 This integer is logically divided into 2 16-bit shorts. The least |
34 This integer is logically divided into 2 16-bit shorts. The least |
35 significant half of the integer is the format/version short. The other |
35 significant half of the integer is the format/version short. The other |
36 short holds feature flags that dictate behavior of the revlog. |
36 short holds feature flags that dictate behavior of the revlog. |
37 |
|
38 Only 1 bit of the format/version short is currently used. Remaining |
|
39 bits are reserved for future use. |
|
40 |
37 |
41 The following values for the format/version short are defined: |
38 The following values for the format/version short are defined: |
42 |
39 |
43 0 |
40 0 |
44 The original revlog version. |
41 The original revlog version. |
51 57005 (0xdead) |
48 57005 (0xdead) |
52 Reserved for internal testing of new versions. No defined format |
49 Reserved for internal testing of new versions. No defined format |
53 beyond 32-bit header. |
50 beyond 32-bit header. |
54 |
51 |
55 The feature flags short consists of bit flags. Where 0 is the least |
52 The feature flags short consists of bit flags. Where 0 is the least |
56 significant bit, the following bit offsets define flags: |
53 significant bit. The bit flags vary by revlog version. |
|
54 |
|
55 Version 0 revlogs have no defined flags and the presence of a flag |
|
56 is considered an error. |
|
57 |
|
58 Version 1 revlogs have the following flags at the specified bit offsets: |
57 |
59 |
58 0 |
60 0 |
59 Store revision data inline. |
61 Store revision data inline. |
60 1 |
62 1 |
61 Generaldelta encoding. |
63 Generaldelta encoding. |
62 |
64 |
63 2-15 |
65 Version 2 revlogs have the following flags at the specified bit offsets: |
64 Reserved for future use. |
66 |
|
67 0 |
|
68 Store revision data inline. |
|
69 1 |
|
70 Generaldelta encoding. |
65 |
71 |
66 The following header values are common: |
72 The following header values are common: |
67 |
73 |
68 00 00 00 01 |
74 00 00 00 01 |
69 v1 |
75 v1 |