Mercurial > hg
annotate mercurial/help/internals/changegroups.txt @ 27434:11150176a000
changegroups: add documentation for cg3
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 18 Dec 2015 09:57:35 -0500 |
parents | a79cba6cb206 |
children | aba2bb2a6d0f |
rev | line source |
---|---|
27372
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1 Changegroups |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
2 ============ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
3 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
4 Changegroups are representations of repository revlog data, specifically |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
5 the changelog, manifest, and filelogs. |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
6 |
27434
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
7 There are 3 versions of changegroups: ``1``, ``2``, and ``3``. From a |
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
8 high-level, versions ``1`` and ``2`` are almost exactly the same, with |
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
9 the only difference being a header on entries in the changeset |
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
10 segment. Version ``3`` adds support for exchanging treemanifests and |
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
11 includes revlog flags in the delta header. |
27372
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
12 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
13 Changegroups consists of 3 logical segments:: |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
14 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
15 +---------------------------------+ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
16 | | | | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
17 | changeset | manifest | filelogs | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
18 | | | | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
19 +---------------------------------+ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
20 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
21 The principle building block of each segment is a *chunk*. A *chunk* |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
22 is a framed piece of data:: |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
23 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
24 +---------------------------------------+ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
25 | | | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
26 | length | data | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
27 | (32 bits) | <length> bytes | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
28 | | | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
29 +---------------------------------------+ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
30 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
31 Each chunk starts with a 32-bit big-endian signed integer indicating |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
32 the length of the raw data that follows. |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
33 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
34 There is a special case chunk that has 0 length (``0x00000000``). We |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
35 call this an *empty chunk*. |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
36 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
37 Delta Groups |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
38 ------------ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
39 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
40 A *delta group* expresses the content of a revlog as a series of deltas, |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
41 or patches against previous revisions. |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
42 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
43 Delta groups consist of 0 or more *chunks* followed by the *empty chunk* |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
44 to signal the end of the delta group:: |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
45 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
46 +------------------------------------------------------------------------+ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
47 | | | | | | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
48 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
49 | (32 bits) | (various) | (32 bits) | (various) | (32 bits) | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
50 | | | | | | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
51 +------------------------------------------------------------+-----------+ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
52 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
53 Each *chunk*'s data consists of the following:: |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
54 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
55 +-----------------------------------------+ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
56 | | | | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
57 | delta header | mdiff header | delta | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
58 | (various) | (12 bytes) | (various) | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
59 | | | | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
60 +-----------------------------------------+ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
61 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
62 The *length* field is the byte length of the remaining 3 logical pieces |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
63 of data. The *delta* is a diff from an existing entry in the changelog. |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
64 |
27434
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
65 The *delta header* is different between versions ``1``, ``2``, and |
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
66 ``3`` of the changegroup format. |
27372
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
67 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
68 Version 1:: |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
69 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
70 +------------------------------------------------------+ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
71 | | | | | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
72 | node | p1 node | p2 node | link node | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
73 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
74 | | | | | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
75 +------------------------------------------------------+ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
76 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
77 Version 2:: |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
78 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
79 +------------------------------------------------------------------+ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
80 | | | | | | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
81 | node | p1 node | p2 node | base node | link node | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
82 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
83 | | | | | | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
84 +------------------------------------------------------------------+ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
85 |
27434
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
86 Version 3:: |
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
87 |
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
88 +------------------------------------------------------------------------------+ |
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
89 | | | | | | | |
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
90 | node | p1 node | p2 node | base node | link node | flags | |
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
91 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | |
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
92 | | | | | | | |
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
93 +------------------------------------------------------------------------------+ |
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
94 |
27372
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
95 The *mdiff header* consists of 3 32-bit big-endian signed integers |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
96 describing offsets at which to apply the following delta content:: |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
97 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
98 +-------------------------------------+ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
99 | | | | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
100 | offset | old length | new length | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
101 | (32 bits) | (32 bits) | (32 bits) | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
102 | | | | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
103 +-------------------------------------+ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
104 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
105 In version 1, the delta is always applied against the previous node from |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
106 the changegroup or the first parent if this is the first entry in the |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
107 changegroup. |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
108 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
109 In version 2, the delta base node is encoded in the entry in the |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
110 changegroup. This allows the delta to be expressed against any parent, |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
111 which can result in smaller deltas and more efficient encoding of data. |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
112 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
113 Changeset Segment |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
114 ----------------- |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
115 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
116 The *changeset segment* consists of a single *delta group* holding |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
117 changelog data. It is followed by an *empty chunk* to denote the |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
118 boundary to the *manifests segment*. |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
119 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
120 Manifest Segment |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
121 ---------------- |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
122 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
123 The *manifest segment* consists of a single *delta group* holding |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
124 manifest data. It is followed by an *empty chunk* to denote the boundary |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
125 to the *filelogs segment*. |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
126 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
127 Filelogs Segment |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
128 ---------------- |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
129 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
130 The *filelogs* segment consists of multiple sub-segments, each |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
131 corresponding to an individual file whose data is being described:: |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
132 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
133 +--------------------------------------+ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
134 | | | | | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
135 | filelog0 | filelog1 | filelog2 | ... | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
136 | | | | | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
137 +--------------------------------------+ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
138 |
27434
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
139 In version ``3`` of the changegroup format, filelogs may include |
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
140 directory logs when treemanifests are in use. directory logs are |
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
141 identified by having a trailing '/' on their filename (see below). |
11150176a000
changegroups: add documentation for cg3
Augie Fackler <augie@google.com>
parents:
27372
diff
changeset
|
142 |
27372
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
143 The final filelog sub-segment is followed by an *empty chunk* to denote |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
144 the end of the segment and the overall changegroup. |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
145 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
146 Each filelog sub-segment consists of the following:: |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
147 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
148 +------------------------------------------+ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
149 | | | | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
150 | filename size | filename | delta group | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
151 | (32 bits) | (various) | (various) | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
152 | | | | |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
153 +------------------------------------------+ |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
154 |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
155 That is, a *chunk* consisting of the filename (not terminated or padded) |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
156 followed by N chunks constituting the *delta group* for this file. |
a79cba6cb206
help: add documentation for changegroup formats
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
157 |