~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/container-format.txt

(jameinel) Allow 'bzr serve' to interpret SIGHUP as a graceful shutdown.
 (bug #795025) (John A Meinel)

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
------------------
130
130
 
131
131
There is a requirement that each object can be given an arbitrary name.
132
 
Some revision control systems address all content by the SHA-1 digest of
 
132
Some version control systems address all content by the SHA-1 digest of
133
133
that content, but this scheme is unsatisfactory for Bazaar's revision
134
134
objects.  We can still allow addressing by SHA-1 digest for those content
135
135
types where it makes sense.
136
136
 
137
137
Some proposed object names:
138
138
 
139
 
  * to name a revision: "``revision:``\ *revision-id*".  e.g., 
 
139
  * to name a revision: "``revision:``\ *revision-id*".  e.g.,
140
140
    `revision:pqm@pqm.ubuntu.com-20070531210833-8ptk86ocu822hjd5`.
141
141
  * to name an inventory delta: "``inventory.delta:``\ *revision-id*".  e.g.,
142
142
    `inventory.delta:pqm@pqm.ubuntu.com-20070531210833-8ptk86ocu822hjd5`.
147
147
 
148
148
Although records are in principle addressable by name, this specification
149
149
alone doesn't provide for efficient access to a particular record given
150
 
its name.  It is intended that seperate indexes will be maintained to
 
150
its name.  It is intended that separate indexes will be maintained to
151
151
provide this.
152
152
 
153
153
It is acceptable to have records with no explicit name, if the expected
155
155
 
156
156
  * a record's content could be self-describing in the context of a
157
157
    particular container, or
158
 
  * a record could be accessed via an index based on SHA-1, or 
 
158
  * a record could be accessed via an index based on SHA-1, or
159
159
  * when streaming, the first record could be treated specially.
160
160
 
161
161
Reasonably cheap for small records
203
203
A **Bytes** record:
204
204
 
205
205
  * has a kind marker of "``B``",
206
 
  * followed by a mandatory **content length** [1]_: 
 
206
  * followed by a mandatory **content length** [1]_:
207
207
    "*number*\ ``\n``", where *number* is in decimal, e.g::
208
208
 
209
209
      1234
210
210
 
211
 
  * followed by zero or more optional **names**: 
 
211
  * followed by zero or more optional **names**:
212
212
    "*name*\ ``\n``", e.g.::
213
213
 
214
214
      revision:pqm@pqm.ubuntu.com-20070531210833-8ptk86ocu822hjd5