/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/pool.txt

  • Committer: Martin Pool
  • Date: 2005-06-28 03:02:31 UTC
  • Revision ID: mbp@sourcefrog.net-20050628030231-d311e4ebcd467ef4
Merge John's import-speedup branch:

                                                                                         
  777 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 22:20:32 -0500
      revision-id: john@arbash-meinel.com-20050627032031-e82a50db3863b18e
      bzr selftest was not using the correct bzr

  776 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 22:20:22 -0500
      revision-id: john@arbash-meinel.com-20050627032021-c9f21fde989ddaee
      Add was using an old mutter

  775 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 22:02:33 -0500
      revision-id: john@arbash-meinel.com-20050627030233-9165cfe98fc63298
      Cleaned up to be less different

  774 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:54:53 -0500
      revision-id: john@arbash-meinel.com-20050627025452-4260d0e744edef43
      Allow BZR_PLUGIN_PATH='' to negate plugin loading.

  773 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:49:34 -0500
      revision-id: john@arbash-meinel.com-20050627024933-b7158f67b7b9eae5
      Finished the previous cleanup (allowing load_plugins to be called twice)

  772 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:45:08 -0500
      revision-id: john@arbash-meinel.com-20050627024508-723b1df510d196fc
      Work on making the tests pass. versioning.py is calling run_cmd directly, but plugins have been loaded.

  771 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:32:29 -0500
      revision-id: john@arbash-meinel.com-20050627023228-79972744d7c53e15
      Got it down a little bit more by removing import of tree and inventory.

  770 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:26:05 -0500
      revision-id: john@arbash-meinel.com-20050627022604-350b9773ef622f95
      Reducing the number of import from bzrlib/__init__.py and bzrlib/branch.py

  769 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 20:32:25 -0500
      revision-id: john@arbash-meinel.com-20050627013225-32dd044f10d23948
      Updated revision.py and xml.py to include SubElement.

  768 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 20:03:56 -0500
      revision-id: john@arbash-meinel.com-20050627010356-ee66919e1c377faf
      Minor typo

  767 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 20:03:13 -0500
      revision-id: john@arbash-meinel.com-20050627010312-40d024007eb85051
      Caching the import

  766 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 19:51:47 -0500
      revision-id: john@arbash-meinel.com-20050627005147-5281c99e48ed1834
      Created wrapper functions for lazy import of ElementTree

  765 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 19:46:37 -0500
      revision-id: john@arbash-meinel.com-20050627004636-bf432902004a94c5
      Removed all of the test imports of cElementTree

  764 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 19:43:59 -0500
      revision-id: john@arbash-meinel.com-20050627004358-d137fbe9570dd71b
      Trying to make bzr startup faster.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Patch pools
 
2
***********
 
3
 
 
4
*Patch pools* are an optimization for efficient storage of related
 
5
branches.  They are not required for the first release.
 
6
 
 
7
Revisions, inventories, and file states are identified in Bazaar-NG by
 
8
universally unique hashes, and they are never modified once they are
 
9
created.  Objects which are common between branches may therefore be
 
10
stored only once and referenced from each branch.  Various strategies
 
11
are available for doing this.
 
12
 
 
13
Objects can be held hard-linked between related branches on
 
14
filesystems that support hardlinks.  This provides automatic reference
 
15
counting as branches are deleted.
 
16
 
 
17
It is common to have several branches of the same project on a
 
18
machine, with many objects in common.  These can be configured with
 
19
each other on the pool path.  The parent should be the default pool
 
20
path when creating a new branch.
 
21
 
 
22
Each user might also have a pool that acts as a cache of all remote
 
23
revisions.  Such a cache might use some kind of least-recently-used
 
24
policy to limit its size.
 
25
 
 
26
The user might nominate a series or hierarchy of pools to be searched for a
 
27
patch; these might be progressively on the local machine, local
 
28
network and remotely.  
 
29
 
 
30
A system like the supermirror might make good use of a pool that
 
31
gradually accumulates all public objects in the world, and stores
 
32
branches very cheaply.
 
33
 
 
34
One complication is garbage collection.  Naive implementations that
 
35
store references from branches into the pool will not be able to
 
36
detect objects that are no longer referenced by any active branch; as
 
37
branches are created and deleted over time such objects will
 
38
accumulate.  This may not be a problem in many cases, given the
 
39
relative abundance of disk compared to programmer time, and the
 
40
relatively small number of long branches that are discarded.  There
 
41
are some partial solutions:
 
42
 
 
43
* Keep a reference count for each object.  There is no problem of
 
44
  circular references.  However, keeping the count accurately requires
 
45
  that branches are never lost or deleted other than through the
 
46
  correct mechanism.
 
47
 
 
48
* From time to time, building a new pool including only objects from
 
49
  active branches.
 
50
 
 
51
* Keeping a pool that holds only patches known to be available from
 
52
  elsewhere, so the pool is only a cache and never the single source
 
53
  of a particular object.  Such a pool can then be discarded at will
 
54
  and the objects will be re-fetched from their original source.
 
55
 
 
56
This last point suggests that new objects should never be written
 
57
solely into a pool, because of the risk that they might be
 
58
accidentally lost.
 
59
 
 
60
Using the parent on the default pool path allows for varying
 
61
greed or laziness in fetching objects.  By default, objects might be
 
62
read only as necessary, and then stored in the local cache.  If the
 
63
user wants to keep the whole history available locally that could be
 
64
specified with a ``--greedy`` option when making the branch, or
 
65
through later pulling down the history.
 
 
b'\\ No newline at end of file'