~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/fetch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-04-14 03:15:43 UTC
  • mfrom: (4257.3.10 stacking-inventory)
  • Revision ID: pqm@pqm.ubuntu.com-20090414031543-gqbs23oebd68p7h7
(andrew) Push parent inventories for all transferred revisions to
        stacked branches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
136
136
            pb.update("Inserting stream")
137
137
            resume_tokens, missing_keys = self.sink.insert_stream(
138
138
                stream, from_format, [])
 
139
            if self.to_repository._fallback_repositories:
 
140
                # Find all the parent revisions referenced by the stream, but
 
141
                # not present in the stream, and make sure we have their
 
142
                # inventories.
 
143
                revision_ids = search.get_keys()
 
144
                parent_maps = self.to_repository.get_parent_map(revision_ids)
 
145
                parents = set()
 
146
                map(parents.update, parent_maps.itervalues())
 
147
                parents.difference_update(revision_ids)
 
148
                parents.discard(NULL_REVISION)
 
149
                missing_keys.update(
 
150
                    ('inventories', rev_id) for rev_id in parents)
139
151
            if missing_keys:
140
152
                pb.update("Missing keys")
141
153
                stream = source.get_stream_for_missing_keys(missing_keys)