/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to doc/developers/inventory.txt

  • Committer: Jelmer Vernooij
  • Date: 2019-10-28 01:38:39 UTC
  • mto: This revision was merged to the branch mainline in revision 7412.
  • Revision ID: jelmer@jelmer.uk-20191028013839-q63zzm4yr0id9b3o
Allow unknown extras in git commits when just inspecting revisions, rather than importing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
Serialization
26
26
=============
27
27
 
28
 
There are several variants of serialised tree shape in use by bzr. To date
29
 
these have been mostly xml based, though plugins have offered non-xml versions.
 
28
There are several variants of serialised tree shape in use by Breezy. To date
 
29
these have been mostly XML-based, though plugins have offered non-XML versions.
30
30
 
31
31
dirstate
32
32
--------
35
35
for the working tree and one for each parent tree, interleaved to allow
36
36
efficient diff and status operations.
37
37
 
38
 
xml
 
38
XML
39
39
---
40
40
 
41
 
All the xml serialized forms write to and read from a single byte string, whose
 
41
All the XML serialized forms write to and read from a single byte string, whose
42
42
hash is then the inventory validator for the commit object.
43
43
 
44
44
 
61
61
 5. Allow fetch to determine the file texts that need to be pulled to ensure
62
62
    that the entire tree can be reconstructed without having to probe every
63
63
    path in the tree.
64
 
 6. Allow bzr to map paths to file ids without reading the entire serialised
 
64
 6. Allow Breezy to map paths to file ids without reading the entire serialised
65
65
    form. This is something that is used by commands such as merge PATH and
66
66
    diff -r X PATH.
67
 
 7. Let bzr map file ids to paths without reading the entire serialised form.
 
67
 7. Let Breezy map file ids to paths without reading the entire serialised form.
68
68
    This is used by commands that are presenting output to the user such as
69
 
    loggerhead, bzr-search, log FILENAME.
 
69
    loggerhead, brz-search, log FILENAME.
70
70
 8. We want a strong validator for inventories which is cheap to generate.
71
71
    Specifically we should be able to create the generator for a new commit
72
72
    without processing all the data of the basis commit.
82
82
Current situation
83
83
-----------------
84
84
 
85
 
The xml based implementation we use today layers the inventory as a bytestring
 
85
The XML-based implementation we use today layers the inventory as a bytestring
86
86
which is stored under a single key; the bytestring is then compressed as a
87
87
delta against the bytestring of its left hand parent by the knit code.
88
88
 
89
89
Gap analysis:
90
90
 
91
91
 1. Succeeds
92
 
 2. Fails - generating a new xml representation needs full tree data.
 
92
 2. Fails - generating a new XML representation needs full tree data.
93
93
 3. Succeeds - the inventory layer accesses the bytestring, which is
94
94
    deterministic
95
95
 4. Fails - we have to reconstruct both inventories as trees and then delta
127
127
 
128
128
Some key layers we have today and can look at using or tweaking are:
129
129
 
130
 
 * Tree objects - the abstract interface bzrlib code works in
 
130
 * Tree objects - the abstract interface breezy code works in
131
131
 * VersionedFiles - the optionally delta compressing key->bytes storage
132
132
   interface.
133
133
 * Inventory - the abstract interface that many tree operations are written in.
503
503
=================
504
504
 
505
505
Inventory deltas and more broadly changes between trees are a significant part
506
 
of bzr's core operations: they are key components in status, diff, commit,
 
506
of Breezy's core operations: they are key components in status, diff, commit,
507
507
and merge (although merge uses tree transform, deltas contain the changes that
508
508
are applied to the transform). Our ability to perform a given operation depends
509
509
on us creating consistent deltas between trees. Inconsistent deltas lead to