~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/knitpack.txt

  • Committer: Alexander Belchenko
  • Author(s): Matt Nordhoff
  • Date: 2007-11-06 06:39:44 UTC
  • mfrom: (2955.4.2 knitpack-typo)
  • mto: This revision was merged to the branch mainline in revision 2969.
  • Revision ID: bialix@ukr.net-20071106063944-v0xj3dzrbt05gjeu
[merge] Fix a few typos in the knitpack.txt doc

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
  bzr init-repo --knitpack-experimental .
112
112
  bzr branch my-source-branch my-new-branch
113
113
  cd my-new-branch
114
 
 
 
114
 
115
115
As a reminder, any of the above approaches can fail if the source branch
116
116
has inconsistent data within it and hasn't been reconciled yet. Please
117
117
be sure to check that before reporting problems.
124
124
are identical to the ones given above except that the name of the format
125
125
to use is ``knitpack-subtree-experimental``.
126
126
 
127
 
WARNING: Note that the subtree formats, ``distate-subtree`` and
 
127
WARNING: Note that the subtree formats, ``dirstate-subtree`` and
128
128
``knitpack-subtree-experimental``, are **not** production strength yet and
129
129
may cause unexpected problems. They are required for the bzr-svn
130
 
plug-in but should otherwise ony be used by people happy to live on the
 
130
plug-in but should otherwise only be used by people happy to live on the
131
131
bleeding edge. If you are using bzr-svn, you're on the bleeding edge anyway.
132
132
:-)
133
133
 
143
143
===============
144
144
 
145
145
Bazaar 0.92 adds a new format (experimental at first) implemented in
146
 
``bzrlib.repofmt.pack_repo.py``.  
 
146
``bzrlib.repofmt.pack_repo.py``.
147
147
 
148
148
This format provides a knit-like interface which is quite compatible
149
149
with knit format repositories: you can get a VersionedFile for a
156
156
==================== =============================================
157
157
packs/               completed readonly packs
158
158
indices/             indices for completed packs
159
 
upload/              temporary files for packs currently being 
 
159
upload/              temporary files for packs currently being
160
160
                     written
161
 
obsolete_packs/      packs that have been repacked and are no 
 
161
obsolete_packs/      packs that have been repacked and are no
162
162
                     longer normally needed
163
163
pack-names           index of all live packs
164
164
lock/                lockdir
184
184
                                             compression base
185
185
======== ========== ======================== ==========================
186
186
 
187
 
Indices are accessed through the ``bzrlib.index.GraphIndex`` class.  
 
187
Indices are accessed through the ``bzrlib.index.GraphIndex`` class.
188
188
Indices are stored as sorted files on disk.  Each line is one record,
189
189
and contains:
190
190
 
191
191
 * key fields
192
192
 * a value string - for all these indices, this is an ascii decimal pair
193
 
   of "offset length" giving the position of the refenced data within 
 
193
   of "offset length" giving the position of the referenced data within
194
194
   the pack body file
195
195
 * a list of zero or more reference lists
196
196
 
219
219
 
220
220
It is not possible to regenerate an index from the body file, because it
221
221
contains information stored in the knit index that's not in the body.
222
 
(In particular, the per-file graph is only stored in the index.) 
 
222
(In particular, the per-file graph is only stored in the index.)
223
223
We would like to change this in a future format.
224
224
 
225
225
The lock is a regular LockDir lock.  The lock is only held for a much
227
227
insertion can be done without the repository locked.  This is an
228
228
implementation detail; the repository user should still call
229
229
``repository.lock_write`` at the regular time but be aware this does not
230
 
correspond to a physical mutex. 
 
230
correspond to a physical mutex.
231
231
 
232
232
Read locks control caching but do not affect writers.
233
233
 
234
234
The newly-added repository write group concept is very important to
235
235
KnitPack repositories.  When ``start_write_group`` is called, a new
236
 
temporary pack is created and all modifications to the repository will 
 
236
temporary pack is created and all modifications to the repository will
237
237
go into it until either ``commit_write_group`` or ``abort_write_group``
238
238
is called, at which time it is either finished and moved into place or
239
239
discarded respectively.  Write groups cannot be nested, only one can be
251
251
``packs/`` directory, but the file is needed for readonly http clients
252
252
that can't easily list directories, and it includes other information.)
253
253
The constraint on the ``pack-names`` list is that every file mentioned
254
 
must exist in the ``packs/`` directory.  
 
254
must exist in the ``packs/`` directory.
255
255
 
256
256
In rare cases, when a writer is interrupted, about-to-be-removed packs
257
257
may still be present in the directory but removed from the list.