~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/inventory.txt

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-06 06:48:25 UTC
  • mfrom: (4070.8.6 debug-config)
  • Revision ID: pqm@pqm.ubuntu.com-20090306064825-kbpwggw21dygeix6
(mbp) debug_flags configuration option

Show diffs side-by-side

added added

removed removed

Lines of Context:
446
446
   growth without affecting the parent node packing.
447
447
#. Update the CHK pointers - serialise every altered node to generate a CHK,
448
448
   and update the CHK placeholder in the nodes parent; then reserialise the
449
 
   parent. CHK pointer propagation can be done lazily when many updates are
 
449
   parent. CHK pointer propogation can be done lazily when many updates are
450
450
   expected.
451
451
 
452
452
Multiple versions of nodes for the same PREFIX and internal prefix width should
453
453
compress well for the same tree.
454
 
 
455
 
 
456
 
Inventory deltas
457
 
================
458
 
 
459
 
An inventory is a serialization of the in-memory inventory delta.  To serialize
460
 
an inventory delta, one takes an existing inventory delta and the revision_id
461
 
of the revision it was created it against and the revision id of the inventory
462
 
which should result by applying the delta to the parent.  We then serialize
463
 
every item in the delta in a simple format:
464
 
 
465
 
'format: bzr inventory delta v1 (1.14)' NL
466
 
'parent:' SP BASIS_INVENTORY NL
467
 
'version:' SP NULL_OR_REVISION NL
468
 
'versioned_root:' SP BOOL NL
469
 
'tree_references:' SP BOOL NL
470
 
DELTA_LINES
471
 
 
472
 
DELTA_LINES ::= (DELTA_LINE NL)*
473
 
DELTA_LINE ::= OLDPATH NULL NEWPATH NULL file-id NULL PARENT_ID NULL LAST_MODIFIED NULL CONTENT
474
 
SP ::= ' '
475
 
BOOL ::= 'true' | 'false'
476
 
NULL ::= \x00
477
 
OLDPATH ::= NONE | PATH
478
 
NEWPATH ::= NONE | PATH
479
 
NONE ::= 'None'
480
 
PATH ::= path
481
 
PARENT_ID ::= FILE_ID | ''
482
 
CONTENT ::= DELETED_CONTENT | FILE_CONTENT | DIR_CONTENT | TREE_CONTENT | LINK_CONTENT
483
 
DELETED_CONTENT ::= 'deleted'
484
 
FILE_CONTENT ::= 'file' NULL text_size NULL EXEC NULL text_sha1
485
 
DIR_CONTENT ::= 'dir'
486
 
TREE_CONTENT ::= 'tree' NULL tree-revision
487
 
LINK_CONTENT ::= 'link' NULL link-target
488
 
BASIS_INVENTORY ::= NULL_OR_REVISION
489
 
LAST_MODIFIED ::= NULL_OR_REVISION
490
 
NULL_OR_REVISION ::= 'null:' | REVISION
491
 
REVISION ::= revision-id-in-utf8-no-whitespace
492
 
EXEC ::= '' | 'Y'
493
 
 
494
 
DELTA_LINES is lexicographically sorted.
495
 
 
496
 
Some explanation is in order. When NEWPATH is 'None' a delete has been
497
 
recorded, and because this inventory delta is not attempting to be a reversible
498
 
delta, the only other valid fields are OLDPATH and 'file-id'. PARENT_ID is ''
499
 
when a delete has been recorded or when recording a new root entry.
500