/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 bzrlib/fetch.py

  • Committer: Vincent Ladeuil
  • Date: 2011-07-06 08:58:15 UTC
  • mfrom: (5609.48.2 2.3)
  • mto: (6012.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6013.
  • Revision ID: v.ladeuil+lp@free.fr-20110706085815-6leauod52jq2u43d
MergingĀ inĀ 2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005-2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
125
125
            pb.update("Inserting stream")
126
126
            resume_tokens, missing_keys = self.sink.insert_stream(
127
127
                stream, from_format, [])
128
 
            if self.to_repository._fallback_repositories:
129
 
                missing_keys.update(
130
 
                    self._parent_inventories(search.get_keys()))
131
128
            if missing_keys:
132
129
                pb.update("Missing keys")
133
130
                stream = source.get_stream_for_missing_keys(missing_keys)
163
160
            self.from_repository, self._last_revision,
164
161
            find_ghosts=self.find_ghosts)
165
162
 
166
 
    def _parent_inventories(self, revision_ids):
167
 
        # Find all the parent revisions referenced by the stream, but
168
 
        # not present in the stream, and make sure we send their
169
 
        # inventories.
170
 
        parent_maps = self.to_repository.get_parent_map(revision_ids)
171
 
        parents = set()
172
 
        map(parents.update, parent_maps.itervalues())
173
 
        parents.discard(NULL_REVISION)
174
 
        parents.difference_update(revision_ids)
175
 
        missing_keys = set(('inventories', rev_id) for rev_id in parents)
176
 
        return missing_keys
177
 
 
178
163
 
179
164
class Inter1and2Helper(object):
180
165
    """Helper for operations that convert data from model 1 and 2
253
238
        return [('texts', new_roots_stream)]
254
239
 
255
240
 
256
 
def _get_rich_root_heads_graph(source_repo, revision_ids):
257
 
    """Get a Graph object suitable for asking heads() for new rich roots."""
258
 
    return 
259
 
 
260
 
 
261
241
def _new_root_data_stream(
262
242
    root_keys_to_create, rev_id_to_root_id_map, parent_map, repo, graph=None):
263
243
    """Generate a texts substream of synthesised root entries.