| ︙ | | | ︙ | |
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
different in separate repositories.
The local state is not versioned and is not synchronized
with the global state.
The local state is not composed of artifacts and is not intended to be enduring.
This document is concerned with global state only. Local state is only
mentioned here in order to distinguish it from global state.
Each artifact in the repository is named by its SHA1 hash.
No prefixes or meta information is added to an artifact before
its hash is computed. The name of an artifact in the repository
is exactly the same SHA1 hash that is computed by sha1sum
on the file as it exists in your source tree.</p>
Some artifacts have a particular format which gives them special
meaning to fossil. Fossil recognizes:
<ul>
<li> [#manifest | Manifests] </li>
<li> [#cluster | Clusters] </li>
<li> [#ctrl | Control Artifacts] </li>
<li> [#wikichng | Wiki Pages] </li>
<li> [#tktchng | Ticket Changes] </li>
<li> [#attachment | Attachments] </li>
<li> [#event | TechNotes] </li>
</ul>
These seven artifact types are described in the following sections.
In the current implementation (as of 2009-01-25) the artifacts that
make up a fossil repository are stored as delta- and zlib-compressed
blobs in an <a href="http://www.sqlite.org/">SQLite</a> database. This
is an implementation detail and might change in a future release. For
the purpose of this article "file format" means the format of the artifacts,
not how the artifacts are stored on disk. It is the artifact format that
is intended to be enduring. The specifics of how artifacts are stored on
disk, though stable, is not intended to live as long as the
|
|
>
|
|
<
>
>
>
>
>
>
>
>
>
|
>
|
|
|
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
different in separate repositories.
The local state is not versioned and is not synchronized
with the global state.
The local state is not composed of artifacts and is not intended to be enduring.
This document is concerned with global state only. Local state is only
mentioned here in order to distinguish it from global state.
Each artifact in the repository is named by a hash of the artifact
content.
No prefixes or meta information is added to an artifact before
its hash is computed.
Each repository uses a single hash algorithm to compute artifact names.
The default algorithm is currently SHA3-256, though this might change
in future releases of Fossil. Historical versions of Fossil used
SHA1. The hash algorithm for a repository can be changed. When a hash
algorithm change occurs, a set of aliases are set up (using the
two-argument version of the M-card on cluster artifacts) so that the
older hash values can be mapped into the new hash values for artifacts
that were added to the repository before the hash algorithm change.
Some artifacts have a particular format which gives them special
meaning to Fossil. The special artifacts are calls "structural
artifacts". Fossil recognizes the following kinds of structural
artifacts:
<ul>
<li> [#manifest | Manifests] </li>
<li> [#cluster | Clusters] </li>
<li> [#ctrl | Control Artifacts] </li>
<li> [#wikichng | Wiki Pages] </li>
<li> [#tktchng | Ticket Changes] </li>
<li> [#attachment | Attachments] </li>
<li> [#event | TechNotes] </li>
</ul>
These seven structural artifact types are described in the following sections.
In the current implementation (as of 2017-02-27) the artifacts that
make up a fossil repository are stored as delta- and zlib-compressed
blobs in an <a href="http://www.sqlite.org/">SQLite</a> database. This
is an implementation detail and might change in a future release. For
the purpose of this article "file format" means the format of the artifacts,
not how the artifacts are stored on disk. It is the artifact format that
is intended to be enduring. The specifics of how artifacts are stored on
disk, though stable, is not intended to live as long as the
|
| ︙ | | | ︙ | |
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
Allowed cards in the manifest are as follows:
<blockquote>
<b>B</b> <i>baseline-manifest</i><br>
<b>C</b> <i>checkin-comment</i><br>
<b>D</b> <i>time-and-date-stamp</i><br>
<b>F</b> <i>filename</i> ?<i>SHA1-hash</i>? ?<i>permissions</i>? ?<i>old-name</i>?<br>
<b>N</b> <i>mimetype</i><br>
<b>P</b> <i>SHA1-hash</i>+<br>
<b>Q</b> (<b>+</b>|<b>-</b>)<i>SHA1-hash</i> ?<i>SHA1-hash</i>?<br>
<b>R</b> <i>repository-checksum</i><br>
<b>T</b> (<b>+</b>|<b>-</b>|<b>*</b>)<i>tag-name</i> <b>*</b> ?<i>value</i>?<br>
<b>U</b> <i>user-login</i><br>
<b>Z</b> <i>manifest-checksum</i>
</blockquote>
A manifest may optionally have a single B-card. The B-card specifies
|
|
|
|
|
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
Allowed cards in the manifest are as follows:
<blockquote>
<b>B</b> <i>baseline-manifest</i><br>
<b>C</b> <i>checkin-comment</i><br>
<b>D</b> <i>time-and-date-stamp</i><br>
<b>F</b> <i>filename</i> ?<i>hash</i>? ?<i>permissions</i>? ?<i>old-name</i>?<br>
<b>N</b> <i>mimetype</i><br>
<b>P</b> <i>artifact-hash</i>+<br>
<b>Q</b> (<b>+</b>|<b>-</b>)<i>artifact-hash</i> ?<i>artifact-hash</i>?<br>
<b>R</b> <i>repository-checksum</i><br>
<b>T</b> (<b>+</b>|<b>-</b>|<b>*</b>)<i>tag-name</i> <b>*</b> ?<i>value</i>?<br>
<b>U</b> <i>user-login</i><br>
<b>Z</b> <i>manifest-checksum</i>
</blockquote>
A manifest may optionally have a single B-card. The B-card specifies
|
| ︙ | | | ︙ | |
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
that is part of the check-in. There are one, two, three, or four
arguments. The first argument is the pathname of the file in the
check-in relative to the root of the project file hierarchy. No ".."
or "." directories are allowed within the filename. Space characters
are escaped as in C-card comment text. Backslash characters and
newlines are not allowed within filenames. The directory separator
character is a forward slash (ASCII 0x2F). The second argument to the
F-card is the full 40-character lower-case hexadecimal SHA1 hash of
the content artifact. The second argument is required for baseline
manifests but is optional for delta manifests. When the second
argument to the F-card is omitted, it means that the file has been
deleted relative to the baseline (files removed in baseline manifests
versions are <em>not</em> added as F-cards). The optional 3rd argument
defines any special access permissions associated with the file. This
can be defined as "x" to mean that the file is executable or "l"
|
|
|
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
|
that is part of the check-in. There are one, two, three, or four
arguments. The first argument is the pathname of the file in the
check-in relative to the root of the project file hierarchy. No ".."
or "." directories are allowed within the filename. Space characters
are escaped as in C-card comment text. Backslash characters and
newlines are not allowed within filenames. The directory separator
character is a forward slash (ASCII 0x2F). The second argument to the
F-card is the lower-case hexadecimal artifact hash of
the content artifact. The second argument is required for baseline
manifests but is optional for delta manifests. When the second
argument to the F-card is omitted, it means that the file has been
deleted relative to the baseline (files removed in baseline manifests
versions are <em>not</em> added as F-cards). The optional 3rd argument
defines any special access permissions associated with the file. This
can be defined as "x" to mean that the file is executable or "l"
|
| ︙ | | | ︙ | |
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
A manifest has zero or one N-cards. The N-card specifies the mimetype for the
text in the comment of the C-card. If the N-card is omitted, a default mimetype
is used.
A manifest has zero or one P-cards. Most manifests have one P-card.
The P-card has a varying number of arguments that
define other manifests from which the current manifest
is derived. Each argument is a 40-character lowercase
hexadecimal SHA1 of a predecessor manifest. All arguments
to the P-card must be unique within that card.
The first argument is the SHA1 of the direct ancestor of the manifest.
Other arguments define manifests with which the first was
merged to yield the current manifest. Most manifests have
a P-card with a single argument. The first manifest in the
project has no ancestors and thus has no P-card or (depending
on the Fossil version) an empty P-card (no arguments).
A manifest has zero or more Q-cards. A Q-card is similar to a P-card
|
|
|
|
|
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
A manifest has zero or one N-cards. The N-card specifies the mimetype for the
text in the comment of the C-card. If the N-card is omitted, a default mimetype
is used.
A manifest has zero or one P-cards. Most manifests have one P-card.
The P-card has a varying number of arguments that
define other manifests from which the current manifest
is derived. Each argument is a lowercase
hexadecimal artifact hash of a predecessor manifest. All arguments
to the P-card must be unique within that card.
The first argument is the artifact hash of the direct ancestor of the manifest.
Other arguments define manifests with which the first was
merged to yield the current manifest. Most manifests have
a P-card with a single argument. The first manifest in the
project has no ancestors and thus has no P-card or (depending
on the Fossil version) an empty P-card (no arguments).
A manifest has zero or more Q-cards. A Q-card is similar to a P-card
|
| ︙ | | | ︙ | |
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
|
[/artifact/28987096ac | here].
<a name="cluster"></a>
<h2>2.0 Clusters</h2>
A cluster is an artifact that declares the existence of other artifacts.
Clusters are used during repository synchronization to help
reduce network traffic. As such, clusters are an optimization and
may be removed from a repository without loss or damage to the
underlying project code.
Clusters follow a syntax that is very similar to manifests.
A cluster is a line-oriented text file. Newline characters
(ASCII 0x0a) separate the artifact into cards. Each card begins with a single
character "card type". Zero or more arguments may follow
the card type. All arguments are separated from each other
and from the card-type character by a single space
character. There is no surplus white space between arguments
and no leading or trailing whitespace except for the newline
character that acts as the card separator.
All cards of a cluster occur in strict sorted lexicographical order.
No card may be duplicated.
The cluster may not contain additional text or data beyond
what is described here.
Unlike manifests, clusters are never PGP signed.
Allowed cards in the cluster are as follows:
<blockquote>
<b>M</b> <i>artifact-id</i><br />
<b>Z</b> <i>checksum</i>
</blockquote>
A cluster contains one or more "M" cards followed by a single "Z"
card. Each M card has a single argument which is the artifact ID of
another artifact in the repository. The Z card works exactly like
the Z card of a manifest. The argument to the Z card is the
lower-case hexadecimal representation of the MD5 checksum of all
prior cards in the cluster. The Z-card is required.
An example cluster from Fossil can be seen
[/artifact/d03dbdd73a2a8 | here].
|
|
|
|
|
|
|
>
>
|
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
|
[/artifact/28987096ac | here].
<a name="cluster"></a>
<h2>2.0 Clusters</h2>
A cluster is an artifact that declares the existence of other artifacts.
Clusters are used during repository synchronization to help
reduce network traffic. Clusters are also used to record aliases
for artifact names, so that if the artifact hash algorithm changes,
artifacts can still be looked up using the older hash algorithm.
Clusters follow a syntax that is very similar to manifests.
A cluster is a line-oriented text file. Newline characters
(ASCII 0x0a) separate the artifact into cards. Each card begins with a single
character "card type". Zero or more arguments may follow
the card type. All arguments are separated from each other
and from the card-type character by a single space
character. There is no surplus white space between arguments
and no leading or trailing whitespace except for the newline
character that acts as the card separator.
All cards of a cluster occur in strict sorted lexicographical order.
No card may be duplicated.
The cluster may not contain additional text or data beyond
what is described here.
Unlike manifests, clusters are never PGP signed.
Allowed cards in the cluster are as follows:
<blockquote>
<b>M</b> <i>artifact-id</i> ?<i>alias</i><br />
<b>Z</b> <i>checksum</i>
</blockquote>
A cluster contains one or more "M" cards followed by a single "Z"
card. Each M card has at least on argument which is the artifact ID of
another artifact in the repository. If the M card has a second argument,
the second argument is an alias for the artifact name.
The Z card works exactly like
the Z card of a manifest. The argument to the Z card is the
lower-case hexadecimal representation of the MD5 checksum of all
prior cards in the cluster. The Z-card is required.
An example cluster from Fossil can be seen
[/artifact/d03dbdd73a2a8 | here].
|
| ︙ | | | ︙ | |
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
|
<td> </td>
<td align=center><b>1</b></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td><b>M</b> <i>uuid</i></td>
<td> </td>
<td align=center><b>1+</b></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
|
|
|
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
|
<td> </td>
<td align=center><b>1</b></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td><b>M</b> <i>uuid</i> ?<i>alias</i>?</td>
<td> </td>
<td align=center><b>1+</b></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
|
| ︙ | | | ︙ | |