~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/fetch.py

Start defining an 'everything' fetch spec.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
from bzrlib.lazy_import import lazy_import
29
29
lazy_import(globals(), """
30
30
from bzrlib import (
 
31
    graph,
31
32
    tsort,
32
33
    versionedfile,
33
34
    )
126
127
            resume_tokens, missing_keys = self.sink.insert_stream(
127
128
                stream, from_format, [])
128
129
            if self.to_repository._fallback_repositories:
129
 
                missing_keys.update(
130
 
                    self._parent_inventories(search.get_keys()))
 
130
                # XXX: if search is EverythingResult this should be
 
131
                # unnecessary, so we can skip this step.  (so long as it causes
 
132
                # the source to send parent invs for all the revs (or just all
 
133
                # present invs)).
 
134
                # (unless the source is damaged!  but not really worth
 
135
                # optimising for that case.  The pack code will reject bad
 
136
                # streams anyway.)
 
137
                if not isinstance(search, graph.EverythingResult):
 
138
                    missing_keys.update(
 
139
                        self._parent_inventories(search.get_keys()))
131
140
            if missing_keys:
132
141
                pb.update("Missing keys")
133
142
                stream = source.get_stream_for_missing_keys(missing_keys)