~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/inventory.txt

  • Committer: Aaron Bentley
  • Date: 2007-12-25 04:17:50 UTC
  • mto: This revision was merged to the branch mainline in revision 3160.
  • Revision ID: aaron.bentley@utoronto.ca-20071225041750-t6chr3pmgnebvqcz
Handle non-directory parent conflicts (abentley, #177390)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
===========
2
 
Inventories
3
 
===========
4
 
 
5
 
.. contents::
6
 
 
7
 
Overview
8
 
========
9
 
 
10
 
Inventories provide an abstraction for talking about the shape of a tree.
11
 
Generally only tree object implementors should be concerned about inventories.
12
 
 
13
 
In memory inventories
14
 
=====================
15
 
 
16
 
In memory inventories are often used in diff and status operations between
17
 
trees. We are working to reduce the number of times this occurs with 'full
18
 
tree' inventory objects, and instead use more custom tailored data structures
19
 
that allow operations on only a small amount of data regardless of the size of
20
 
the tree.
21
 
 
22
 
 
23
 
Serialization
24
 
=============
25
 
 
26
 
There are several variants of serialised tree shape in use by bzr. To date
27
 
these have been mostly xml based, though plugins have offered non-xml versions.
28
 
 
29
 
dirstate
30
 
--------
31
 
 
32
 
The dirstate file in a working tree includes many different tree shapes - one
33
 
for the working tree and one for each parent tree, interleaved to allow
34
 
efficient diff and status operations.
35
 
 
36
 
xml
37
 
---
38
 
 
39
 
All the xml serialized forms write to and read from a single byte string, whose
40
 
hash is then the inventory validator for the commit object.
41
 
 
42
 
journalled
43
 
----------
44
 
 
45
 
The in development journalled inventory serializer generates a single byte
46
 
string during serialization, but may require many byte strings to deserialize,
47
 
and these are discovered recursively.