##// END OF EJS Templates
help: clarify overlap of revlog header and first revlog entry...
Nathan Goldbaum -
r42593:bfd65b5e default
parent child Browse files
Show More
@@ -28,8 +28,8 b' File Format'
28 ===========
28 ===========
29
29
30 A revlog begins with a 32-bit big endian integer holding version info
30 A revlog begins with a 32-bit big endian integer holding version info
31 and feature flags. This integer is shared with the first revision
31 and feature flags. This integer overlaps with the first four bytes of
32 entry.
32 the first revision 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
@@ -78,10 +78,10 b' 00 02 00 01'
78 00 03 00 01
78 00 03 00 01
79 v1 + inline + generaldelta
79 v1 + inline + generaldelta
80
80
81 Following the 32-bit header is the remainder of the first index entry.
81 Following the 32-bit header is the remaining 60 bytes of the first index
82 Following that are remaining *index* data. Inlined revision data is
82 entry. Following that are additional *index* entries. Inlined revision
83 possibly located between index entries. More on this layout is described
83 data is possibly located between index entries. More on the this inlined
84 below.
84 layout is described below.
85
85
86 Version 1 Format
86 Version 1 Format
87 ================
87 ================
@@ -149,8 +149,12 b' If revision data is not inline, then raw'
149 separate byte container. The offsets from bytes 0-5 and the compressed
149 separate byte container. The offsets from bytes 0-5 and the compressed
150 length from bytes 8-11 define how to access this data.
150 length from bytes 8-11 define how to access this data.
151
151
152 The first 4 bytes of the revlog are shared between the revlog header
152 The 6 byte absolute offset field from the first revlog entry overlaps
153 and the 6 byte absolute offset field from the first revlog entry.
153 with the revlog header. That is, the first 6 bytes of the first revlog
154 entry can be split into four bytes containing the header for the revlog
155 file and an additional two bytes containing the offset for the first
156 entry. Since this is the offset from the beginning of the file for the
157 first revision entry, the two bytes will always be set to zero.
154
158
155 Version 2 Format
159 Version 2 Format
156 ================
160 ================
General Comments 0
You need to be logged in to leave comments. Login now