~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/fetch.txt

  • Committer: Andrew Bennetts
  • Date: 2011-01-12 22:10:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5612.
  • Revision ID: andrew.bennetts@canonical.com-20110112221010-1qu9vsibnyictun3
Describe streams a little in fetch.txt.

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
Streams
69
69
=======
70
70
 
71
 
 
72
 
Network stuff?
73
 
==============
74
 
 
75
 
 
76
 
Stacking
77
 
========
78
 
 
79
 
 
80
 
 
81
 
 
82
 
 
83
 
hhhh
84
 
----
 
71
A **stream** is an iterable of (substream type, substream) pairs.
 
72
The **substream type** is a ``str`` that will be one of ``texts``,
 
73
``inventories``, ``inventory-deltas``, ``chk_bytes``, ``revisions`` or
 
74
``signatures``.  A **substream** is a record stream.  The format of those
 
75
records depends on the repository format being streamed, except for
 
76
``inventory-deltas`` records which are format-independent.
 
77
 
 
78
A stream source can be constructed with ``repo._get_source(to_format)``,
 
79
and it provides a ``get_stream(search)`` method (among others).  A stream
 
80
sink can be constructed with ``repo._get_sink()``, and provides an
 
81
``insert_stream(stream, src_format, resume_tokens)`` method (among
 
82
others).
85
83
 
86
84
 
87
85
..