/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

Merge improvements to fetch from Andrew.

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
        phase = 'file'
158
158
        pb = bzrlib.ui.ui_factory.nested_progress_bar()
159
159
        try:
 
160
            from_repo = self.from_repository
160
161
            revs = search.get_keys()
161
 
            graph = self.from_repository.get_graph()
162
 
            revs = list(graph.iter_topo_order(revs))
163
 
            data_to_fetch = self.from_repository.item_keys_introduced_by(revs,
164
 
                                                                         pb)
 
162
            revs = list(from_repo.get_graph().iter_topo_order(revs))
 
163
            data_to_fetch = from_repo.item_keys_introduced_by(revs, pb)
165
164
            text_keys = []
166
165
            for knit_kind, file_id, revisions in data_to_fetch:
167
166
                if knit_kind != phase:
189
188
                    # Before we process the inventory we generate the root
190
189
                    # texts (if necessary) so that the inventories references
191
190
                    # will be valid.
192
 
                    self._generate_root_texts(revs)
 
191
                    self._generate_root_texts(revisions)
193
192
                    # NB: This currently reopens the inventory weave in source;
194
193
                    # using a single stream interface instead would avoid this.
195
 
                    self._fetch_inventory_weave(revs, pb)
 
194
                    self._fetch_inventory_weave(revisions, pb)
196
195
                elif knit_kind == "signatures":
197
196
                    # Nothing to do here; this will be taken care of when
198
197
                    # _fetch_revision_texts happens.
199
198
                    pass
200
199
                elif knit_kind == "revisions":
201
 
                    self._fetch_revision_texts(revs, pb)
 
200
                    self._fetch_revision_texts(revisions, pb)
 
201
                    self.count_copied += len(revisions)
202
202
                else:
203
203
                    raise AssertionError("Unknown knit kind %r" % knit_kind)
204
204
            if self.to_repository._fetch_reconcile:
206
206
        finally:
207
207
            if pb is not None:
208
208
                pb.finished()
209
 
        self.count_copied += len(revs)
210
209
        
211
210
    def _revids_to_fetch(self):
212
211
        """Determines the exact revisions needed from self.from_repository to